0

I am on Windows.

Here are the specs

react-native-cli: 1.0.0
react-native: 0.32.0

Starting react-native using

react-native start

it will take upto 3-4 mins to start serving JS bundle, but after initial run it won't detect changes made in different files.

Reloading the bundle from device or simulator always return the bundle of the first run. I've to kill and restart the react-native.

It was happening now frequently, previously it only happens if the react-native has been started and stayed idle for sometime.

Zahid Riaz
  • 2,879
  • 3
  • 27
  • 38

2 Answers2

0

If your changing only JS file and you want to see changes immediately, enable hot/live reloading. Note this works only for development build, if your doing production build you should use Codepush.

user6380431
  • 134
  • 1
  • 5
0

react-native's runing command has upgraded for a while, and it uses caches to run faster,but it also cause a problem that cache is not cleaned after you change your code.so sometimes(may be always),it's runing the cache.

my solution is cacel the runinng process, and restart react-native.

ctrl+C & react-native start

looking for a better solution.

njafei
  • 107
  • 5
  • Hello, and welcome to StackOverflow. Answer posts should be used to provide a solution to the question. If you have another question, please post a new question. – Chait Mar 09 '17 at 02:53
  • this is a solution, but not the best . so I say a better solution. – njafei Mar 09 '17 at 03:08