Mac configuration react native development environment

Source: Internet
Author: User
Tags install brew install node



Always feel that learning a thing, do not learn how to do not, like learning swift, watching the video without hands, remember that the point, their own writing things are not here there is a problem is there error.



So, later learn to do more hands-on.



Now My Learning task is: improve their iOS code professional ability, master Swift3.0, by the way learn to learn react Native.



Learning a language, of course, hardware and software equipment, or how to learn ... Hey, right!!!!



Below is a record of your own configuration react native development environment:



1> Installing brew:



Open Terminal, enter:/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"



In the Max OS X 10.11 (El Capitan) version, homebrew may encounter permissions issues where the/usr/local directory is not writable when installing the software. You can use the following command to fix:



sudo chown-rwhoami/usr/local



Terminal print output such as:






See return field No, do not like me silly, but also enter return, and then return to ... And then there is no response, in fact------you press ENTER.



The next display is installed, for example, to indicate that the installation is ready:









You can use the command to see if the installation was successful:



Brew-v



Here's my install brew version:











2> install node. js.



Use Homebrew to install node. js.


React native requires NODEJS version 4.0 or higher. When this article was released, homebrew installed the 6.x version by default and fully met the requirements.


Enter the following command:


 
brew install node








3>react Native Command-line tool (REACT-NATIVE-CLI)


React Native's command-line tools are used to perform tasks such as creating, initializing, updating projects, running packaged Services (packager), and so on.

NPM install-g REACT-NATIVE-CLI

As follows:

 





If you see eacces:permission denied such a permission error, then please refer to the above homebrew, fix the/usr/local directory ownership:


sudo chown-rwhoami/usr/local

4> Recommended Tools for installation Watchman


Watchman is a tool for monitoring file system changes provided by Facebook. Installing this tool can improve performance at development time (Packager can quickly capture file changes for real-time refresh).


Brew Install Watchman

5>flowflow is a static JS type checking tool. What you see in many examples is the weird colon question mark, and the same syntax as the type in the method parameter, which is the grammar of the flow tool. This syntax does not belong to the ES Standard, just Facebook's own code specification. So the Novice can skip directly (i.e. no need to install the tool, and it is not recommended to bother learning flow-related syntax).

Brew Install Flow

6> test the installation terminal go to your project to place the directory Input command installation, Awesomeproject for your project name can be modified by itself. This process can take a long time .... Scientific Internet is the key;

React-native Init Awesomeproject








Note: This step of the installation process is very slow, waiting patiently yo!!!





7> go to this directory after download is complete


CD myraectnative



You can also open the awesomeproject folder and run it, or double-click the ios/awesomeproject.xcodeproj file and click Run in Xcode Button.






is not the record of special details Ah ... Hey, I am so stupid all installed, I believe you can certainly ...??



Then start your own react native learning journey!!!






Mac configuration react native development environment


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.