Need help with expo-and-typescript?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

janaagaard75
222 Stars 36 Forks MIT License 510 Commits 0 Opened issues

Description

Showcase of an Expo app written in TypeScript.

Services available

!
?

Need anything else?

Contributors list

# 168,746
http-pr...
iis
React
CSS
408 commits
# 136,154
Homebre...
C++
TeX
Mobile
1 commit
# 254,591
React
Android
React N...
iOS
1 commit
# 732,883
TypeScr...
iOS
Android
Mobile
1 commit
# 566,969
Java
TypeScr...
iOS
Android
1 commit
# 94,068
Less
Sass
koa2
reactjs
1 commit
# 732,884
TypeScr...
iOS
Android
Mobile
1 commit
# 396,914
Shell
CSS
React
atomic-...
1 commit

React Native using Expo and Typescript

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

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

Known and Unknown Packages

When upgrading Expo,

expo-cli
will also upgrade the versions of all the package that it knows about. This list naturally includes all the
expo-
packages, but also a few more. Do not change the version numbers of the known packages. Unknown packages may be upgraded. More info in my blog post Upgrade an Expo App.

Known packages:

@unimodules/core, expo-analytics-amplitude, expo-apple-authentication, expo-asset, expo-av, expo-barcode-scanner, expo-blur, expo-brightness, expo-camera, expo-constants, expo-facebook, expo-font, expo-linear-gradient, expo-local-authentication, expo-permissions, expo-sensors, react-native-gesture-handler, react-native-maps, react-native-reanimated, react-native-screens, react-native-svg, react-native-safe-area-context, @react-native-community/masked-view, react-native, react, typescript, @types/react, babel-preset-expo, @types/react-native, expo
.

Unknown packages:

@react-navigation/native, @react-navigation/stack, tslib, @types/expo__vector-icons, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, eslint-config-prettier, eslint-plugin-prettier, eslint-plugin-react, expo-cli, prettier
.

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.