New React Native project with old version of react native

Solution 1:

There is a new parameter in react-native init that allows just this. Try:

react-native init --version="[email protected]" MyNewApp

Here my source. I have successfully tested it with react-native-cli 2.0.1.

Solution 2:

rninit is a replacement for react-native init that allows you to specify a particular version of react-native to use.

Install rninit globally:

npm install -g rninit

Specify which version of react-native to use:

rninit init [Project Name] --source [email protected]

Thanks to @vanson-wing-leung for pointing me to rninit

Solution 3:

Use the --version flag.

react-native init blank --version [email protected]

Solution 4:

Try this:

If you install the version of react-native that you want in your project, you can then navigate to (project)/node_modules/react-native/local-cli. Here you will see three generator folders which enclose the exact files RN would have used to initiate a project.

It's a bit manual, but at least you'll have access to the original files.

Solution 5:

specify react-native version at the time of installing

something like this

react-native init --version="[email protected]" ExampleApp