Bug: React Refresh with HMR regresses changes if a dependent module changes and then the depending module changes #1620
Replies: 4 comments 1 reply
-
I don't know for certain, but it's possible this is related: facebook/react#17281 |
Beta Was this translation helpful? Give feedback.
-
I just tested the same scenario on Next.js and it didn't reproduce, so it seems unlikely to be an issue with Fast Refresh itself. @FredKSchott any ideas? |
Beta Was this translation helpful? Give feedback.
-
Okay, it looks like this regressed in 2.9.0. The bad commit is: @Akimyou do you know what would cause this? I'll dig into the change a little and see if I can find the cause. |
Beta Was this translation helpful? Give feedback.
-
This regressed again. It's broken in Snowpack 3.3.7. |
Beta Was this translation helpful? Give feedback.
-
If I have a module tree like this:
App imports Guide
Guide imports Bubble
Bubble exports a string const
Guide uses the string in a React compnoent
If I change Bubble, then HMR works and I see the new Bubble
If I change Guide AFTER that, then the previous version of Bubble is used, which regresses the first HMR.
Here's a video:
Screen Recording 2020-11-16 at 9.05.19 PM.mp4.zip
Here's a repro:
https://github.com/aaronjensen/snowpack-hmr-repro
I couldn't find any existing discussions that had this same issue...
Beta Was this translation helpful? Give feedback.
All reactions