Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create specify typescript RN version?

I type the command to create React Native project with typescript.

npx react-native init MyApp --template react-native-template-typescript

package.json

"react-native": "0.63.2"

I want to create 0.62.2 with typescript so I try the command:

npx react-native init MyApp --version 0.62.2 --template react-native-template-typescript

package.json

"react-native": "0.63.0"

It is 0.63.0 not 0.62.2

Why I can't create 0.62.2 with typescript ?

like image 621
Morton Avatar asked Jun 08 '26 07:06

Morton


1 Answers

For typescript template, the version of react native depends on the react-native-template-typescript version, for example:

  • [email protected] --> [email protected]
  • [email protected] --> [email protected]

Therefore if you want to install version [email protected], you need to apply the command like this:

npx react-native init AwesomeTSProject --template [email protected]

more info: react-native-template-typescript releases

like image 67
Julio CB Avatar answered Jun 11 '26 19:06

Julio CB