npx create-expo --example with-typescriptTypeScript is a superset of JavaScript which gives you static types and powerful tooling in Visual Studio Code including autocompletion and useful inline warnings for type errors.
- Create a project:
npx create-expo --example with-typescript cdinto the project
- Create a blank TypeScript config:
touch tsconfig.json - Run
yarn startornpm run startto automatically configure TypeScript - Rename files to TypeScript,
.tsxfor React components and.tsfor plain typescript files
💡 You can disable the TypeScript setup in Expo CLI with the environment variable
EXPO_NO_TYPESCRIPT_SETUP=1 expo start