You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In useEffect, when there is an update of state, the cleanup function of old state runs and then the callback function of the updated state runs.
In your code, when there is an update of state, the callback function of the updated state runs and then the cleanup function of updated state runs. The cleanup runs same as callback.
The text was updated successfully, but these errors were encountered:
In useEffect, when there is an update of state, the cleanup function of old state runs and then the callback function of the updated state runs.
In your code, when there is an update of state, the callback function of the updated state runs and then the cleanup function of updated state runs. The cleanup runs same as callback.
The text was updated successfully, but these errors were encountered: