Useful Commands

React-Native

CommandDescription
npx react-native@latest init AwesomeProjectCreating a new application
react-native run-androidrun app on android
react-native run-iosrun 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-allWatchman Clean
react-native -vreact-native version
npm view react-native versionactual react native version
npm installinstall project dependencies
npm view react-scripts versionreact-native script version
npx react-native ram-bundleOptimize the loading of the bundle by using the RAM format
npx react-native bundleJavaScript bundle for offline use: