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 was experiencing how useEffect was re-running with empty dependencies due to HMR (which was expected) on changes, but I saw how re-running did not trigger the useEffect cleanup function. This was unexpected and maybe a bug? I thought I would reference the HMR / Fast Refresh docs to verify the expected behaviour before reporting, but I could not find anything (apart from reactnative.dev) on any React owned sites! All docs/articles I could find were on third party sites.
AFAIK, Fast Refresh is the native (as in built-in) React solution to HMR, so it is part of React. That means it has an API exposed to end users, and I would then expect it to be documented. Searching "HMR" or "Fast Refresh" comes up with nothing when using the docs search feature.
I can only find "implicit docs" on Fast Refresh on the issue tracker (such as these by Dan: facebook/react#21019) or on external articles and none mention how the cleanup callback is supposed to work in Fast Refresh mode.
The text was updated successfully, but these errors were encountered:
I was experiencing how
useEffect
was re-running with empty dependencies due to HMR (which was expected) on changes, but I saw how re-running did not trigger the useEffect cleanup function. This was unexpected and maybe a bug? I thought I would reference the HMR / Fast Refresh docs to verify the expected behaviour before reporting, but I could not find anything (apart from reactnative.dev) on any React owned sites! All docs/articles I could find were on third party sites.AFAIK, Fast Refresh is the native (as in built-in) React solution to HMR, so it is part of React. That means it has an API exposed to end users, and I would then expect it to be documented. Searching "HMR" or "Fast Refresh" comes up with nothing when using the docs search feature.
I can only find "implicit docs" on Fast Refresh on the issue tracker (such as these by Dan: facebook/react#21019) or on external articles and none mention how the cleanup callback is supposed to work in Fast Refresh mode.
The text was updated successfully, but these errors were encountered: