New React Native project with old version of react native

后端 未结 7 419
渐次进展
渐次进展 2020-12-07 18:18

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:

相关标签:
7条回答
  • 2020-12-07 18:59

    specify react-native version at the time of installing

    something like this

    react-native init --version="react-native@0.52.0" ExampleApp
    
    0 讨论(0)
  • 2020-12-07 19:08

    Use the --version flag.

    react-native init blank --version react-native@0.14.2
    
    0 讨论(0)
  • 2020-12-07 19:12

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

    react-native init --version="react-native@0.36.0" MyNewApp
    

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

    0 讨论(0)
  • 2020-12-07 19:17

    react-native init MyApp --version react-native@0.58.6

    0 讨论(0)
  • 2020-12-07 19:19

    For existing react native project to downgrade run

    npm install react-native@0.13.2
    

    Then verify the version by running

    react-native -version
    
    0 讨论(0)
  • 2020-12-07 19:21

    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.

    0 讨论(0)
提交回复
热议问题