12.0 - React Native Intro
Last updated
Last updated
React Native is a based off of the principals and concepts of React, but is instead used to build mobile apps!! There are a lot of similarities between React Native and React, and lots to learn within React Native itself. In this section, we're just going to install create-react-native-app, and challenge you to learn more!
The first thing we're going to do is install create-react-native-app, this is extremely similar to create-react-app, but instead for native! Go ahead and globally install it, using the following command.
npm install -g create-react-native-app
Now, just like using create-react-app, we're going to use this to create a new native app! Get into a folder where you're going to want your new react native app folder to be inside of. Then run the following and change 'your-app' to whatever you want it to be!
create-react-native-app your-app
Then go ahead and cd into your project and type:
npm start
Next, you need to install the Expo client app on your iOS or Android phone and connect to the same wireless network as your computer. Using the Expo app, scan the QR code from your terminal to open your project.
Once you do this, boom you have a live reloading native app!
There is a lot to react native. The docs from Facebook are excellent, and a great place to start, check them out .
Go ahead and go through the facebook tutorial to check out react native and start building stuff!