react native - How can I enable Live Reload or Hot Reload without having to shake my phone? -


i started using react native 2 weeks, , need reinstall app, shake phone again , enable live reload.

it's funny @ first week, gets boring have shake phone while developing.

is there config file can set development properties enabled?

there's closed issue related open menu pressing screen 3 fingers. can check if in latest versions (or in expo) working: https://github.com/facebook/react-native/issues/10191

also there other 3 solutions:

1) can run adb shell input keyevent keycode_menu in terminal

2) try this: https://github.com/facebook/react-native/issues/10191#issuecomment-328854286

open rn dev menu

/usr/local/bin/adb shell input keyevent keycode_menu reload rn

/usr/local/bin/adb shell input keyevent 82 /usr/local/bin/adb shell input keyevent 66 /usr/local/bin/adb shell input keyevent 66 (reload not working without adding last line)

in preferences->keyboard->keyboard shortcuts can map these services keyboard shortcuts. added shortcuts context of editor (webstorm) , react native debugger. in these programs can press ctrl+d show developer menu , ctrl+r reload works perfectly.

3) or can try (android only) https://medium.com/delivery-com-engineering/react-native-stop-shaking-your-phone-1f4863140146

  1. set automator service opening automator, clicking “new document”, , choosing “service”.

  2. find , select “run shell script” action. choose “no input” “service receives” , enter: /usr/local/bin/adb shell input keyevent 82 if adb located elsewhere in system, change path adb. can find out with: $ adb

  3. save , remember name give action.

  4. open “system preferences”, go “keyboard” , select “shortcuts” tab. select “services” on left column , find service name.
  5. click says “none” , enter keyboard shortcut want use. make unique or conflict existing shortcut.

notes: android must plugged in if you’ve never run following device, run first before trying shortcut: $ adb reverse tcp:8081 tcp:8081

hope helps.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -