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
I believe the whole idea of this code is to prevent changing the state of a component after the component was already removed/unmounted.
but what happens if the async call returns somehow before useEffect is called? in that case, we won't keep the original behavior we wanted.
so, doesn't this code makes more sense? (set to ref to true upon initiation):
Hi,
I believe the whole idea of this code is to prevent changing the state of a component after the component was already removed/unmounted.
but what happens if the async call returns somehow before useEffect is called? in that case, we won't keep the original behavior we wanted.
so, doesn't this code makes more sense? (set to ref to true upon initiation):
The text was updated successfully, but these errors were encountered: