2

On Mac, I created a React Native project via create-react-native-app and then ejected the app. Then I ran npm run ios, which is an alias for react-native run-ios. At that point, I can see it start up in the simulator and the packager opens in a new terminal window. It looks like it is watching for any changes on JS files in my project directory, yet when I make a basic edit in the JSX in the App.js file, I don't see anything happening in the packager terminal window and it doesn't reload the app in the simulator.

Edit: I just tested it on the react-native CLI and it happens there as well. I'm at a loss what the issue could be.​​

Am I missing something or is there another issue?

enter image description here

zeckdude
  • 15,877
  • 43
  • 139
  • 187
  • Try `Cmd + R` on the simulator to check if it refreshes the bundle again in the packager.If you want to watch the changes that you save realtime you need to enable `hot reloading` from the `Cmd + D` , the `devtools` option – Pritish Vaidya Mar 01 '18 at 12:01
  • 1
    Oh man, I can't believe I missed that part. Submit it as the answer and and I'll pick yours. – zeckdude Mar 01 '18 at 14:32

1 Answers1

1

For the app to refresh, you need to do Cmd + R which refreshes the packager and lets it watch the refreshed bundle. For Realtime Loading, use Cmd + D to enable the devtools and enable Hot Reloading. Hope it helps!

Pritish Vaidya
  • 21,561
  • 3
  • 58
  • 76