Hello Friends 👋,
Welcome To Infinitbility! ❤️
In this article, You already familiar with every command I have shared the article but the purpose article is to get all useful commands in a single article.
For Windows users, 🔖 bookmark this article then you do not need to write a command every time. ( windows cmd can’t ❌ save the history of commands )
Let’s start today topic “React Native commands you need almost every day”
Gradlew Clean
the gradlew clean
commands use to clean the Gradle cache & delete temporary files.
1gradlew clean
npm start || yarn start
the npm start
or yarn start
command used to run their own metro server for react native project.
- npm users
1npm start -- --reset-cache
- yarn users
1yarn start -- --reset-cache
Run project
Run cammands use for to launch your app on devices.
- for android development
1npx react-native run-android
- for iOS development
1npx react-native run-ios
Ya… Ya… No one can use run-ios
command 😎 we are a xcoder 😁.
Install package
For adding packages on our project we are use below command.
- npm users
1npm install [email protected]
npm i
😏… ( why I born… what is the purpose of my life 😢 )
- yarn users
1yarn add [email protected]
React Native link
React Native link command use to link your native dependencies.
1npx react-native link
Release apk
For build apk file we use gradlew assembleRelease
command.
1gradlew assembleRelease
Custom Script
create your own scripts like below example.
1"scripts": {2 "shake": "adb shell input keyevent 82",3 "run-a": "react-native run-android",4 "run-i": "react-native run-ios",5 "clean": "cd ./android && ./gradlew clean",6 "android": "cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug",7 "build:an": "cd android && gradlew assembleRelease"8},
Thanks for reading… 🙏🏻.
More From React Native Tutorial
Basics
- Introduction To React Native
- React Native Environment Setup using expo
- React Native Environment Setup for windows
- React Native Environment setup on Mac OS
- React Native Environment setup on linux
- React Native Project Structure
- React Native State
- React Native Props
- React Native Styling
- React Native Flexbox
- React Native Text
- React Native Textinput
- React Native Commands
- React Native ScrollView
Advances
- React Native Dark Mode
- React Native Fonts
- React Native SQLite
- React Native DatepickerAndroid
- React native ScrollView scroll to position
- How to align icon with text in react native
- React Native Image
- React Native Firebase Crashlytics
- React Native Async Storage
- React Native Share
Error & Issue Solution
- Task :app:transformDexArchiveWithDexMergerForDebug FAILED In React Native
- Expiring Daemon because JVM heap space is exhausted In React Native
- Task :app:transformNativeLibsWithMergeJniLibsForDebug FAILED In React Native
- Unable to determine the current character, it is not a string, number, array, or object in react native
- App crashed immediately after install react native video or track player
- how to delete SQLite database in android react native
- React native material dropdown twice click issue
- How to get the current route in react-navigation?
- how to disable drawer on the drawer navigation screen?
- Image not showing in ios 14 react native
- React Native image picker launchimagelibrary on second time issue
- how to open any link from react native render Html