React-native Getting Started

Source: Internet
Author: User
Tags install node

First, the Environment configuration: (1). Installing the latest version of Xcode is recommended for XCode7.1 and above. PS: If it is not the latest version, it may be compiled after the new project. The small part is not before the upgrade to the latest version of Xcode, and then a compilation problem plagued by a long time. ) (2). Install Homeblew (an installation package Manager on an OS system that can be installed after installation to facilitate subsequent installation of the package.) ) Terminal command:
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
(3). Install node. JS (server-side JavaScript runtime Environment): https://nodejs.org/download/After successful installation, the terminal will have the following message:
node. JS is installed at:/usr/local/bin/node NPM is installed at:/USR/LOCAL/BIN/NPM? Make sure That/usr/local/bin are in your $PATH.
(4). It is recommended to install Watchman (react a tool to modify the source file) Terminal command:
Brew Install Watchman
(5). Install Flow: A JavaScript static type checker. Terminal command:
Brew Install Flow
(6). Install React Native CLI: command-line tool Terminal command for developing react Native:
sudo npm install-g react-native
Install the environment, you can play happily. Or you can do this:
    1. Brew Install NVM (NVM is a little faster than NPM, but I don't feel it, it's basically the same way NPM uses)
    2. Brew Install Watchman (react a tool to modify the source file)
    3. Brew Install flow (type checker for JS scripts)
    4. sudo npm install-g react-native-cli (Start installing react-native)
Basic use of react-native
    1. React-native Init myApp (creating a project called Mympp, takes a long time, but may also be the reason for the speed, where it will generate a node_mobiles directory in the parallel directory of MYAPP, there will be a lot of supporting files, Don't change it.
    2. CD myApp (cut into the project directory)
    3. React-native Run-android (running Android)

React-native will generate Android and iOS directly, so you don't need to add a platform.

React-native Getting Started

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.