Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save DeveloperBeau/ee477a3cad75ae3a09a8dc8591aa69cf to your computer and use it in GitHub Desktop.

Select an option

Save DeveloperBeau/ee477a3cad75ae3a09a8dc8591aa69cf to your computer and use it in GitHub Desktop.
#React native commands
#Android is different where the simulator has to be running before it can be built to a device.
#please note that you should replace the android model with the emulator you use.
#sleep is due to my own machine's time to bring up a simulator
#as run android has a chance to break if the simulator isn't up by the time it finishes compiling the app.
run-android () { $ANDROID_HOME/tools/emulator -avd Nexus_5X_API_23 &\
sleep 15;\
react-native run-android &\
wait }
#iOS is lot simpler ;)
run-ios () { react-native run-ios }
#When react native (normally android but has happened with iOS) bugs out while compiling, try running this
fix-react-native () { npm install &\
yarn &\
yarn start --reset-cache &\
wait }
@DeveloperBeau
Copy link
Author

You asked for it, and I provide. my .zsh functions for react native development.
Don't forget to install yarn as well as npm (as i prefer yarn).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment