You should create a new react native project without the default template. By using the '-template blank' option. This will create a react native project with 'App.js' as the entry point, and no typescript.
E.g)run this command npx create-expo-app appname --template blank
You should create a new react native project without the default template. By using the '-template blank' option. This will create a react native project with 'App.js' as the entry point, and no typescript.
E.g)run this command npx create-expo-app appname --template blank
Or you can use npx create-expo-app@latest appname --no-ts
*** Update November 2024 ***
Option 1
Initialize the project with npx create-expo-app@latest or npx create-expo-app@latest --template blank-typescript
Option 2
Use the template with one command npx create-expo-app -t expo-ts.
For more info please read the Starting React Native Project in 2025 article.
*** Update January 2024 ***
Option 1
- Initialize the project with
npx create-expo-appcommand. - Create a
tsconfig.jsonin your project root withtouch tsconfig.json. - Rename
App.jstoApp.tsxwithmv App.js App.tsx. - Run
yarn startornpm run start. It will prompt you to install the required dependencies (typescript, @types/react, @types/react-native), and automatically configure yourtsconfig.json. - Switch to the "bare" workflow with
npx expo ejectcommand.
For more info see the docs on Expo Typescript support.
Option 2
Initialize the project with npx react-native init MyApp --template react-native-template-typescript command.
For more info see the docs on React Native Typescript support.
Option 3
Use the template with one command npx create-expo-app -t expo-ts.
For more info please read Starting React Native Project in 2024 article.
*** Original Answer February 2022 ***
Option 1
- Initialize the project with
expo initcommand and chooseminimalas a template. Or use this command:expo init --template bare-minimum --name <your-app-name>. - Create a
tsconfig.jsonin your project root:touch tsconfig.json. - Rename
App.jstoApp.tsx:mv App.js App.tsx. - Run
expo start. It will prompt you to install the required dependencies (typescript, @types/react, @types/react-native), and automatically configure yourtsconfig.json.
For more info see the docs on Expo Typescript support.
Option 2
Use the template with one command expo init --template @vladimir-vovk/expo-bare-typescript.
For more info please read Starting React Native Project in 2022 article.
!! Unfortunately, expo-template-bare-typescript package is outdated. It will install Expo 41.
+ 4.62.0: there is no longer the option to create a Bare Workflow project with Typescript already configured.
So:
- run:
expo init nome-do-seu-app - Choose:
Bare Workflow -> Minimal - Create a
tsconfig.jsonin your project root - Run
expo start. It will prompt you to install the required dependencies (typescript, @types/react, @types/react-native), and automatically configure your tsconfig.json.
- Open the tsconfig.json and add
"strict": true
- Rename App.js to App.tsx: mv App.js App.tsx.
Finish
Now your project Bare Workflow is with Typescript configured!
I got it the correct command would be:
npx create-expo-app@latest --template
and select the blank from the options to get the bare minimum configuration, just like the React Native one with JavaScript.
npx create-expo-app --template blank
This command helps you to install app on basic format which is 'jsx' format.
» npm install expo-ts