dmitripavlutin.com
How React Updates State
2
If you're updating the state of a React component, expect the state variable to receive the new value on the next rendering. Read full article