DEV Community

Discussion on: Accessing React State right after setting it

Collapse
 
dukemai profile image
dukemai

interesting post. My favorite solution is to use requestAnimationFrame for the block that want to receive the new state. I usually limit usage of componentDidUpdate in this case since it can cause forever loop if there is any state update in componentDidUpdate