Jordan Ell Jordan Ell - 7 months ago 80
iOS Question

New React Native project with old version of react native

I am trying to create a new react native project which should utilize an older version of react-native.

The result I would like would be to do something like:

react-native init MyProject
but have the version of react-native it uses be

However, there doesn't seem to be any options with
for initializing with old versions of react-native.

react-native init MyProject
and then dowgrading react-native in
also does not work because the
command installs a bunch of xcode templates which are used to build the app and there is no
command which will dowgrade these templates. (There is an

I tried downgrading my version of react-native-cli to
which was current when react-native
was current, but this did not work. From looking at the cli source, it seems it always initializes with just the newest version of react-native.

I realize this is pretty weird to want to start a new project at an old version, but I have a weird set of requirements that are forcing this.


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 react-native@0.14.2

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