-
Notifications
You must be signed in to change notification settings - Fork 791
Closed
Labels
Description
Description
First off, thanks so much for your tireless work on this project! This is the most essential dev tool I use.
In the README, it states:
Hooks would be reset if their order changes. Adding, removing or moving around would cause a local tree remount.
Sounds amazing! This is exactly what I want. However, it doesn't seem to be doing this.
Expected behavior
I see in the source for react-hot-loader
this promising line:
⚛️🔥🎣 Hook order change detected: …
But I never see that. I've also set a breakpoint on that line and it's never called.
Actual behavior
Changing hook order or adding/removing hooks results in the usual errors from React:
- "Should have a queue."
- "Rendered fewer hooks than expected."
- etc.
Environment
React Hot Loader version: 4.12.17
Run these commands in the project folder and fill in their results:
node -v
:v12.11.0
npm -v
:6.11.3
Then, specify:
- Operating system: macOS
10.15.1
- Browser and version: Chrome Canary
80.0.3965.0
Reproducible Demo
Minimal project: https://github.com/nfarina/hooktest