staltz / react-native-node

Run a separate Node.js process behind a React Native app
MIT License
1.12k stars 33 forks source link

Weird behavior with livereload #16

Open soyuka opened 6 years ago

soyuka commented 6 years ago

This needs a more thorough investigation.

  1. Followed the readme, added this on a "already built app" (ie run-android ran at least once before)
  2. Had issue with cannot requireindex.js`
  3. Removed app (uninstall), run-android, put live reload back and node app was terminated right when launched
  4. Removed again (uninstall), now it's fine can run http server and request

I think that there's something going on when I launch run-android a second time, the node app isn't updated? I'll let you know if I can reproduce this or improve DX somehow.

staltz commented 6 years ago

So far this library does not support reloading, you need to rebundle the background project and recompile the APK.

soyuka commented 6 years ago

Yes that I got, though rebundling + recompiling equals to: react-native-node insert ./src/backend && react-native run-android? Why does uninstalling changes the behavior?