Preliminary study on React Native

Source: Internet
Author: User
Tags install node

Featured Articles

React Native Introduction: Building IOS Apps with JavaScript (1)

React Native Introduction: Building IOS Apps with JavaScript (2)

React Native Introductory example Tutorial series articles

React native Component Development series articles

React Native Environment Building-Mac Edition

1. Installing homebrew

Use Brew-v to see if it has been installed;

If not, the browser accesses the http://brew.sh/installation

2. Install node

Use Node-v to see if it has been installed

installation command:

Install node

3. Installing Watchman

installation command:

Install Watchman

Watchman is a Facebook file monitor, React Native uses it to detect code changes in order to recompile

4. Install flow

installation command:

Install Flow

Flow is a tool for detecting JS syntax

5. Install React Native via NPM

installation command:

Install -G react-native-cli

NPM is node's package Manager, equivalent to iOS cocoapods or Java maven

6. Create HelloWorld Example

Under terminal, switch to the folder where you want to save the project, and then run:

$ react-native init HelloWorld

This is built with CLI tools.

The following directories are created:

7. Running Helloworld.xcodeproj

Open iOS project, run, run the results as follows:

This step encountered a problem, run an error:

.. /node_modules/react-native/packager/react-native-xcode. SH : react-/bin/sh127

Workaround:

https://github.com/facebook/react-native/issues/3948

Someone in this article gives a way to

.. /node_modules/react-native/packager/react-native-xcode.sh

At the beginning of the file, add:

SOURCE ~/.bash_profile

But I tried not to succeed.

The later approach is to comment out the last piece of code react-native-xcode.sh

#react-Native Bundle #  --entry-file  index.ios.js #  --platform iOS #   --Dev $DEV  #"$DEST/main.jsbundle"   #" $DEST "

Preliminary study on React Native

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.