expo-and-typescript

by janaagaard75

janaagaard75 / expo-and-typescript

Showcase of an Expo app written in TypeScript.

216 Stars 35 Forks Last release: Not found MIT License 462 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

React Native using Expo and Typescript

This is a React Native demo app using the Expo framework and written in TypeScript.

This repo used to also contain a type definition file for Expo. That work was merged into the

@types/expo
package.

@types/expo
is now deprecated in favor of definition types includes with the
expo
package. TypeScript FTW!

Screen shot

Prerequisites

  • Node.js.
  • Yarn.
  • Optional: XCode, since it includes the iOS Simulator. XCode only runs on Macs.
  • Optional: Android Studio, since it includes the Android Virtual Device Manager.

You don't need to install any global npm packages for this repo.

expo-cli
is included as a dev dependency.

Warnings When Installing Packages

There are a surprising amount of of warnings when installing Node packages, because of peer dependencies not being correct. My guess is that the Expo team has a tough time getting all the added React Native libraries to play well together. This app seems to run fine, so I believe it's safe to ignore the warnings.

Running the App

Start the local server. This will give you a QR code that you can scan using the Expo Client app on your mobile device.

yarn start

If you're on a Mac and have Xcode installed, you can run the app using the iOS Simulator with the following command. I am sure you can do something similar with Android.

yarn ios

Troubleshooting

If you have issues running the app it may help clearing the React Native packager cache. Use the command

yarn expo start --clear
to do this.

More tips found in this thread on the Expo Forum.

Similar Projects

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.