3

I'm running a react-native app in an Android emulator through Android Studio. I want to redeploy code changes fast. Is there some way to force a hot reload into the emulator? Here's what I've tried so far:

  • Double tap r usually works. If a text field is selected, it doesn't work (it just types rr). I haven't found any ways to deselect a text field without selecting another text field.
  • The run app button in IDE doesn't work when modifying .js files. Android Studio does not recognize the .js files as part of the project, so it doesn't detect changes and refuses to hot reload the emulator. I've imported the project according to the instructions in react-native docs and I've also tried various other ways of setting up the project. It just won't recognize anything beyond the "android" directory.
Atte Juvonen
  • 4,922
  • 7
  • 46
  • 89
  • I think react-native hot reloading only works if it's a fully react-native. But I can assure that it worked for my test cases. I used Visual Studio Code. – Murat Karagöz Dec 07 '16 at 16:05
  • Possible duplicate of [How to reload in the default Android emulator for react native app](https://stackoverflow.com/questions/38039736/how-to-reload-in-the-default-android-emulator-for-react-native-app) – Nick Jan 05 '19 at 01:02

2 Answers2

4

Try to use command + M or command + D

Ide choice depending on personal habits, recommend vscode.

Ahmad Aghazadeh
  • 16,571
  • 12
  • 101
  • 98
舒文颉
  • 91
  • 1
0

There is a perfect answer for your question posted here https://stackoverflow.com/a/52857409/10827286

Press CTRL + M, the menu will show and you can click on Live Reload or Hot Reload