Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HMR is loading new code but not rerendering #16505
Is this a bug report?
Have you read the Contributing Guidelines?
Packages: (wanted => installed)
Target Platforms: iOS 10/11, Android 6, 7, 8
Steps to Reproduce
The "Hot Reloading..." prompt appears on both iOS and Android, followed by rerendering and the updating of the application to reflect code changes.
The "Hot Reloading..." prompt appears on both iOS and Android. However, the application does not update to reflect code changes. However, manually triggering rerenders within the application, such as via pull-to-refresh/RefreshControl, will show that the bundle code has been updated.
The functionality was fine on 0.48.3, but has broken with the upgrade with 0.49/0.50.
referenced this issue
Nov 21, 2017
I can confirm that "The functionality was fine on 0.48.3, but has broken with the upgrade with 0.49/0.50.". Issue is real and workaround proposed by @arcanjoqt didn't work at my case. I upgraded react-deep-force-update to v2.1.1 - and HMR still doesn't work. With React Native 0.48.3 HMR was working really well...
I have the same problem on Win10, RN 0.50.4.
In 0.47.1 hot reloading worked perfectly. After update to 0.49.5 it still worked but kind of erratically - usually there were two "Hot reloading" toasts shown before the application was actually updated. Since 0.50.3 it has stopped working altogether.
Having the same issue (RN 0.51.0).
Strange thing is that when I set up a brand new RN project (
When I just create a simply
in a class in my project and ignore everything else the HMR still doesn't work.
So for us it turns out to be related to an old version of react-deep-force-update being used. Another issue that I found was due to the usage of
To fix the issue you need to force upgrade react-deep-force-update to version 1.1.1. I found it a bit tricky without changing directly
Also if you are using
The above steps makes your RN packager use a forked version of
What happened? Why is the version incorrect?
I'm not sure why, but like @IvanCoronado and @tbergq the fix isn't working for me. The version of
If anyone has any additional theories or what information is relevant for debugging, I can investigate in our code. I'm at a bit of a loss how to continue otherwise.
Look forward to your investigation. I also have this problem.
I've gone as far as making all of my react native dependencies match the example that a new project is created with.
After doing this react-deep-force-update is already installed as 1.1.1 automatically, but HMR doesn't work. You can see it downloading the new version but not rerendering until I do something that causes a rerender.
added a commit
Apr 3, 2018
@kmagiera I've noticed that having:
and then running
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.