The configuration of the environment depends on the operating platform you are applying, IOS, Android, or both. You just need to choose one, because different environments are just a little different when you are in Setup. The following is an environment configuration that is run on the IOS system using Mac. Environment Configuration
Development tools: Xcode, node.js, react Native command line tools, Watchman.
It is officially recommended that you use Homebrew to install node and watchman. Install Homebrew
Installation of the official website prompts the following command to copy directly to the terminal. Then you will be prompted "press RETURN to continue or any of the other key to abort
“. You can press return and then ask for an administrator password. The following interface will appear after the success.
! []http://7xpl1c.com1.z0.glb.clouddn.com/063baa23-8755-40cb-9e90-c5e3e4c1b1b7.png Note: If there are any problems, you can go directly to the official website there are various solutions. Installing node
After installing Homebrew, execute the following command:
/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
Brew Install node
Brew install Watchman
Node has NPM, allowing you to install the React Native command-line interface directly.
sudo npm install-g react-native-cli
Installation prompts you to enter a password to install successfully. Note: If you encounter the "Cannot find module ' npmlog '" error, first perform the following name
curl-0-L http://npmjs.org/install.sh | sudo sh
Install Xcode
Just go to the Mac App Store to download it. testing the installation of React Native
The following is the creation of a project called "Awesomeproject" using react Native. And then use the "react-native run-ios" command to run the project in that directory
React-native init awesomeproject
cd awesomeproject
react-native Run-ios
Of course you can run it directly using Xcode or nuclide. Modify App
Now that we have successfully run the app, let's modify it to open index.ios.js change its contents use command⌘+ R to reload the iOS emulator other
For other operating systems or Android development please read the following articles