*** 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.
*** 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!
Videos
ยป npm install @echobind/expo-typescript
I really like expo router, but it takes a little bit of effort to get TypeScript, absolute imports, eslint, jest, prettier, etc. setup, So I created a quickstart project that you can just clone and start working.
Hope you all enjoy!
https://github.com/thedevenvironment/expo-router-typescript
ยป npm install @react-native-school/expo-typescript-template
ยป npm install expo-template-typescript-jest