-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
React version: 16.13.1
Steps To Reproduce
- Use
<script defer />to fetchreactandreact-domfrom CDN - Wait for
DOMContentLoadedevent - Call
injectIntoGlobalHookfromreact-refresh/runtimebefore firstReactDOM.render - Touch some module which has hot reloading enabled
- Watch in despair as nothing happens 😢
- Enable React Development Tools
- Touch some module which has hot reloading enabled (again)
- Watch in awe as things update in real-time 🥇
Originally I just posed this as a question to @gaearon whether this behavior was by design, i.e. that the react-refresh code actually needed the React Development Tools but I'm presuming no?
I stepped through the code and noticed that when performReactRefresh ran, the collections helpersByRendererID, failedRootsSnapshot and mountedRootsSnapshot we're all empty. As soon as I enabled React Development Tools things started working. So what did I miss?
I can try to repo this if necessary but I'm using my own bundler that is using some proprietary stuff so I would like to use that as a last resort. There's gotta be some basic stuff that I haven't considered...
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug