DEV Community

Discussion on: Accessing React State right after setting it

Collapse
 
theodesp profile image
Theofanis Despoudis

Sometimes state changes from higher order components or from implicit state changes so you use componentDidUpdate to properly catch the new state and perform some additional logic.