React native Pit (create the specified react-native version) _react-native

Source: Internet
Author: User
Create the specified react-native version

Just began to learn react Native, a lot of do not understand, build the environment when encountered quite a lot of problems, has been tossing.

I built the environment according to the react native document, the installation REACT-NATIVE-CLI uses the following command.

NPM install-g REACT-NATIVE-CLI

After installation, a project test is created Found React-native version is the latest 0.50.1, this version of the directory is not index.android.js and index.ios.js two files, more index.js and app.js and other documents

Just learn react native to use the latest version will certainly encounter many others did not encounter the pit, and I bought the book "React native Cross-platform mobile application Development" This book uses the 0.41.0 version, in order to unify so still use the low version
As a result, I took it for granted that using the React-native init demo @0.41.0 This command to create a lower version of the project, the result is not correct, so that the creation is still the latest version of the project.
Later in Baidu to see said that when the installation of REACT-NATIVE-CLI can be specified version, using NPM install-g react-native-cli @0.41.0, and then I put the REACT-NATIVE-CLI uninstall, reinstall, No matter how the test is not possible, directly to the error. It may be possible, but I can't do it if I try.
Then another method was found:

React-native Init demo--verbose--version 0.41.0

Originated from: http://www.jianshu.com/p/717dee645939
I have tried it, but I don't know the exact principle.

Reference: https://stackoverflow.com/questions/34211131/new-react-native-project-with-old-version-of-react-native/ 37623531#37623531

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.