How to setup React-Native with Typescript and Expo — The new way!

Stefan Knoch
4 min readNov 17, 2018

Since a recent update of Expo, the Typescript integration got a lot easier. Many articles describing how to do it before are outdated now, even documentation is still missing as of right now.

In this article I will not only show how to configure typescript but also how to setup other required tools for a proper development environment like: Testing, Linting and .env loading.

If you want to start coding right away, please have a look at my boilerplate: https://github.com/ch1ll0ut1/react-native-expo-typescript-boilerplate

1. Create a Expo React-Native App

Install expo (if you didn’t do that before)

yarn global add expo-cli

Create the project

expo init my-project
cd my-project
yarn start

Now you are set with a basic react-native app using expo. If you want to know more go to https://facebook.github.io/react-native/docs/getting-started.html

2. Add typescript support

Expo now has typescript already built in, so we can start right away using it by renaming App.js to App.tsx.

--

--