re: How to pass state between components in reactjs VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Why?
 

setState happens asynchronously... Therefore you need to use previous state first to ensure you are using the latest if you are going to calculate the state based on previous state.

code of conduct - report abuse