Hot Reloading is not working
Problem
- [ x ] I have reviewed the documentation - [ x ] I have searched existing issues - [ x ] I am using the latest React Native version Hot Reloading is not updating the view in Android device even we have made changes. It happens after a Reload triggered from the device. I have tested this issue in v0.55.2, 0.54.0 and 0.53.3. The only version that has hot reload still functioning well is 0.53.3, this problem starts occuring from 0.54.0 Environment OS: Windows 10 Node: 6.11.5 Yarn: 1.3.2 npm: 4.6.1 Watchman: Not Found Xcode: N/A Android Studio: Version 3.0.0.0 AI-171.4443003 Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.2 => 0.55.2 Steps to Reproduce 1. Run `react-native init NoHotLoad` 2. Run `react-native run-android` 3. When the project loaded, enable the Hot Reloading 4. Make changes to the App.js, like editing the text. The change should appear in the device. 5. Do Reload on the device 6. Repeat step 4, but the change won't appear at the device. Just a toast of Hot reloading appears. Another scenario: after installing the app to the device, replace step 2 above with `npm start` should also reproduces this problem. Expected Behavior The Hot Reloading should be able to hot-reload all the changes, regardless number of attempts of reload. Actual Behavior The Hot Reloading only works before a Reload action triggerred
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Hot Reloading is not working
I have 3 different projects with versions 0.51, 0.54 and 0.55. The first project works fine. I think this happened after a they announced new metro (v0.52 I guess) You can see detailed bug and debug report the link above. I don't know when there will be a fix, meanwhile, you can use the simple dirty hack I did for my project: https://gist.github.com/cihadturhan/dda54a25eae398d7db0b06292f0cac9c
Trust Score
6 verifications
- 1
I have 3 different projects with versions 0.51, 0.54 and 0.55. The first project
I think this happened after a they announced new metro (v0.52 I guess)
- 2
You can see detailed bug and debug report the link above. I don't know when ther
You can see detailed bug and debug report the link above. I don't know when there will be a fix, meanwhile, you can use the simple dirty hack I did for my project:
- 3
https://gist.github.com/cihadturhan/dda54a25eae398d7db0b06292f0cac9c
https://gist.github.com/cihadturhan/dda54a25eae398d7db0b06292f0cac9c
Validation
Resolved in facebook/react-native GitHub issue #18899. Community reactions: 17 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep