React Commands


All the React commands and their functions

Index List:

  1. React Commands
  2. React Native Commands
  3. Brew Commandså

Basic React Commands

Commands Description
babel index.js --out-file=bundle.js --presets=env,react --watch sets up babel with react and env presets index.js input and bundle the output file


React Native Commands

Commands Description
npm install -g react-native-cli Installs the react native cli, used tor un the mobile enviroment and dev tools
react-native init projectName Using React Native CLI, create a new react native project
react-native run-ios Runs The emulator on MacOS for Mac, "must have emulator installed via X-code"
react-native run-android Runs The emulator on Andriod Studio For Windows, "Must have Android Studio Installed and a mobile downloaded"
npm install --global expo-cli Install Expo CLi requires Node.js and Npm installed
expo init my-project Creates A new React Native Expo Project
yarn start | yarn android | yarn web Starts the Native App
yarn ios # requires an iOS device or macOS for access to an iOS simulator

React Native Packages

Commands Packages
npm install @react-navigation/native Used for Routing npm install @react-navigation/stack Used for Routing History


Brew Commands

Commands Description
brew list Shows all the packages installed by brew.
brew --version Prints Current version of brew
brew update Updates only brew
brew upgrade Updates All Packages installed by Brew
brew install python Installs Python using Brew
brew upgrade python Upgrades Python to newest version
brew pin [packagename] Prevents that package from being updated
brew unpin [packagename] unpins the package from being updated
brew cleanup [packagename] uninstalls old versions of that package (brew does not automactically uninstall old versions)
brew cleanup Uninstalls old versions of every package (brew does not automactically uninstall old versions)
brew cleanup -n Shows the packages that would be cleaned up in ther terminal