question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hot reloading not working

See original GitHub issue

Description

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

https://user-images.githubusercontent.com/31221440/153813534-61c1be58-4407-47b6-9a9c-576865e77c4d.mov

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

8reactions
mohamadmekcommented, Jul 27, 2022

Check enable fast refresh device -> shake -> enable fast refresh

6reactions
dmontecillocommented, May 12, 2022

Is there any fix for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot Reload is not working in my React App - Stack Overflow
Hot Reload is not working in my React App · This does happen sometimes. Do npm install and try adding some code. ·...
Read more >
Hot reload not working - Visual Studio Feedback
I'm trying to use Hot Reload on Android Emulador, but when I do any change in XAML file, the app doesn't update. Looking...
Read more >
Hot Reload stopped working with React "^17.0.1" · Issue #9904
Describe the bug Hot reloading when the redux-state change stopped working when I use CRA to get the last React version.
Read more >
Troubleshooting XAML Hot Reload - Visual Studio (Windows)
If Hot Reload is not available · Verify that XAML Hot Reload is enabled · Verify that you use Start Debugging rather than...
Read more >
Hot Reload not working in React 17.0.3 - Code with Mosh Forum
Hi, I have recently created a new project with create-react-app. Also, I am following Mosh's Mastering React course and according to it, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found