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
This ticket was originally reported in the React issue as a potential bug: facebook/react#24502
After a short discussion with @gaearon I volunteered to update the docs so that once someone learns about empty dependencies array in useEffect simulating componentDidMount they won't be surprised to see effect callback run twice on mount.
The text was updated successfully, but these errors were encountered:
@gaearon I know you guys are working really hard on moving beta.reactjs.org out of "beta" but is there a chance this little improvement to the old useEffect docs will get merged? 🥺 (You asked for it in May: facebook/react#24502 (comment))
This ticket was originally reported in the React issue as a potential bug: facebook/react#24502
After a short discussion with @gaearon I volunteered to update the docs so that once someone learns about empty dependencies array in
useEffect
simulatingcomponentDidMount
they won't be surprised to see effect callback run twice on mount.The text was updated successfully, but these errors were encountered: