I recently tried to crate a new react native app by using the `
npx react-native@latest init AwesomeProject
` command but it created a folder with a app.tsx file.
How can I force it to create a app.js instead? Or can I just replace it with a javascript file? I can't find an awnser to this so hopefully someone can help me.
Greetings
Ben
React native of >=0.71 version considers Typescript as default. You can change the .tsx file to the .js file by changing the file extension and deleting the typescript codes from the file.
But react-native <=0.70 version still considers JavaScript as default. To install react native of <=0.70 you can use the following command on CLI:
npx react-native init <project_name> --version 0.70
Here you can write the version you want.
Official Reference: Using JavaScript Instead of TypeScript
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With