Install React Native And Create First React Native App On Mac

Introduction

React Native is a popular cross-platform mobile app development framework. We can develop Android and iOS with independent platform wise mobile app development, and it reduces time and cost for the app. React native development can do impossible things in the last few years. Now, it's a complete game changer technique. Anyone can develop with a single language for both android and iOS.

The easiest way to start React Native mobile app development is with Expo CLI. Expo has a set of tools built around react native. You need the latest version of Node.js and Android Emulator or Simulator.

Pre-requirements

We have a list of development tools that we need to install before we begin the configuration.

  • Xcode
  • VSCode (Visual Studio Code)
  • GitSCM

Step 1

Homebrew is a type of platform dependency installation tool which would allow us to install all required files. Terminal prompt -> Type the below command

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew --version

Step 2

The next step is to install the node.js using terminal command or manually download and install it on your mac machine.

brew install node
node –version
npm --version

Step 3

Next step is to install the watchman using terminal command.

brew install watchman
watchman --version

Step 4

Next step is to install the React Native CLI using terminal command.

npm install -g react-native-cli

Step 5

Next step is to install latest version of Xcode command line tools and you need to follow the below steps.

Open Xcode -> Preferences -> Locations tab -> install the latest version of Xcode command line tools.

Step 6

Next step is to create your first react native project in Mac using below terminal command

react-native init MyProject

Output

Conclusion

Hopefully, this article has given you sufficient information for you to create a react native project and run the app on both Android/iOS. Feel free to leave a comment if you would like me to further elaborate on anything within this article.


Similar Articles