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