skip to Main Content

I started learning React Native, created a project using React Native CLI, but it uses TypeScript by default. Can I somehow create a project using React Native CLI, but without TypeScript or do I need to just remove all TypeScript manually?

2

Answers


  1. From the 0.71 version of React-Native typescript is added by the default. More information here.

    Of course, you can change the files extensions to .js and .jsx and uninstall unnecessary typescript packages. Nonetheless, I would suggest to use typescript though.

    Login or Signup to reply.
  2. Solution 01:
    TypeScript is the default for new projects created with the React Native CLI. If you want to create a project without TypeScript, you’ll need to remove TypeScript files and configurations manually from the generated project. There isn’t a specific CLI option to exclude TypeScript during project creation.

    Solution 02:
    Other solution is that you can try previous versions of react native like

    npx react-native init MyProject --version 0.70
    

    It will create react native project with javascript instead of typescript template.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search