Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No API docs on React Refresh #5847

Open
fatso83 opened this issue Mar 30, 2023 · 1 comment
Open

No API docs on React Refresh #5847

fatso83 opened this issue Mar 30, 2023 · 1 comment

Comments

@fatso83
Copy link

fatso83 commented Mar 30, 2023

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.

@gaearon
Copy link
Member

gaearon commented Mar 30, 2023

Yea we don't have a great place to put them yet.

What you're describing sounds like a bug but we'd need a repro case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants