as state changes are happening asynchronously, how can I wait until state change is complete and call a function? Note: I am using functional component.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
as state changes are happening asynchronously, how can I wait until state change is complete and call a function? Note: I am using functional component.
For further actions, you may consider blocking this person and/or reporting abuse
Linearloop Private Limited -
Chetan Rohilla -
Rahul Sharma -
ochieng seth -
Discussion (1)
I think useEffect is what you are looking for