Hot reloading not working
See original GitHub issueDescription
After setting up new react native project, I’m not able to hot reloading. To push any code changes to simulator, I have to follow this steps:
- Terminate the metro server.
- Start the metro server again
- Run yarn react-native run-ios to deploy latest build to simulator
Version
0.67.3
Output of npx react-native info
`info Fetching system and libraries information…
System:
OS: macOS 12.2
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 72.04 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - /var/folders/wv/hl_2xrbs0_g785yr_mvj3r_w0000gq/T/yarn--1644820056516-0.9598795301282483/node
Yarn: 1.22.17 - /var/folders/wv/hl_2xrbs0_g785yr_mvj3r_w0000gq/T/yarn--1644820056516-0.9598795301282483/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Watchman: 2022.02.07.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/lib/ruby/gems/3.0.0/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7199119
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_312 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.2 => 0.67.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
✨ Done in 3.21s.`
Steps to reproduce
-
Start metro server - yarn react-native start
-
Open another terminal and run - yarn react-native run-ios
-
iOS simulator will open and you’ll see app running
-
Now do any cod changes or text changes and save
-
Reload the metro server by tapping “r” or reload the simultor by cmd+r or shake the iOS device from menu option and choose reload or do all three steps
-
Result - Changes are not reflecting
I need to kill the metro server, then start again then need to run ios build again
Snack, code example, screenshot, or link to a repository
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Check enable fast refresh device -> shake -> enable fast refresh
Is there any fix for this?