Useful Commands
React-Native
Command | Description |
---|---|
npx react-native@latest init AwesomeProject | Creating a new application |
react-native run-android | run app on android |
react-native run-ios | run app on android |
react-native link [LIBRARY-NAME] | Link dependencies |
npm install babel-plugin-transform-decorators-legacy --save npm install babel-plugin-transform-class-properties --save | Install Babel for JSX |
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug cd android ./gradlew assembleDebug | apk in android/app/build/outputs/apk/app-debug.apk Create debug build |
react-native start # OR if you don't have react-native installed in the machinenpx react-native start | Start Metro Server |
watchman watch-del-all | Watchman Clean |
react-native -v | react-native version |
npm view react-native version | actual react native version |
npm install | install project dependencies |
npm view react-scripts version | react-native script version |
npx react-native ram-bundle | Optimize the loading of the bundle by using the RAM format |
npx react-native bundle | JavaScript bundle for offline use: |
Updated 2 months ago