examples/with-expo-typescript/README.md
This is a starter project for creating universal React apps with Next.js, Expo, and TypeScript.
💡 For the most updated info, see the Expo + Next.js Docs!
react-native-web packages by default to enable the use of react-native in a browser or Node.js environment.react-native-* packages do not support web, please refer to reactnative.directory for a list of web compatible packages.pages/_document component by running yarn next-expo customize.Deploy the example using Vercel (web only):
Deploy the native app to the App store and Play store using Expo deployment.
Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-expo-typescript with-expo-typescript-app
yarn create next-app --example with-expo-typescript with-expo-typescript-app
pnpm create next-app --example with-expo-typescript with-expo-typescript-app
🚨 Using default Expo web with Next.js is not supported.
yarn dev (yarn next dev).Deploy the web app to the cloud with Vercel (Documentation).
npm i -g expo-cli.yarn ios or yarn android -- This runs expo start with the Expo CLI.yarn eject and building the project manually (this requires a macbook for iOS).Deploy the native app to the App store and Play store using Expo deployment.
You may find that certain packages like @ui-kitten/components do not work in the browser. This is because they need to be transpiled by Next.js, you can fix this by doing the following:
yarn add -D next-compose-plugins next-transpile-modules
next.config.js:const { withExpo } = require("@expo/next-adapter");
const withPlugins = require("next-compose-plugins");
const withTM = require("next-transpile-modules")([
// Add the name of your package here...
"@ui-kitten/components",
]);
module.exports = withPlugins([withTM, [withExpo, { projectRoot: __dirname }]], {
// ...
});