diff --git a/.gitignore b/.gitignore index b6c6c86e..90e2b675 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,7 @@ with-nextjs/out */backend/.env .DS_Store -report.html \ No newline at end of file +report.html + +# Maintenance logs +.sdk-upgrade-logs \ No newline at end of file diff --git a/blank/README.md b/blank/README.md index 55b696f6..adcc8750 100644 --- a/blank/README.md +++ b/blank/README.md @@ -19,18 +19,17 @@ - Install packages with `yarn` or `npm install`. - If you have native iOS code run `npx pod-install` -- Run `yarn start` to start the bundler. +- Run `yarn start` or `npm run start` to start the bundler. - Open the project in a React runtime to try it: - iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779) - Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample) - Web: Any web browser -## Adding Native Code +## Running/Modifying Native Code -This project can be run from a web browser or the Expo client app. You may find that you want to add more native code later on. You can do this by ejecting the project and rebuilding it yourself. +You can generate native iOS and Android projects from your Expo config file (**app.json**/ **app.config.js**) by runnning `npx expo prebuild`. These native projects can then be compiled and run via XCode and Android Studio. -- Run `yarn eject` to create the native projects. -- You can still run your project in the web browser or Expo client, you just won't be able to access any new native modules you add. +> 💡 Learn more about [native code in Expo](https://docs.expo.dev/workflow/customizing/) ## Publishing diff --git a/blank/app.json b/blank/app.json new file mode 100644 index 00000000..fd9aba0b --- /dev/null +++ b/blank/app.json @@ -0,0 +1,12 @@ +{ + "expo": { + "name": "blank", + "slug": "blank", + "version": "1.0.0", + "platforms": [ + "ios", + "android", + "web" + ] + } +} diff --git a/blank/package.json b/blank/package.json index d9fbfdce..857a9338 100644 --- a/blank/package.json +++ b/blank/package.json @@ -1,12 +1,12 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/navigation/README.md b/navigation/README.md index 96ebec12..bc733ebd 100644 --- a/navigation/README.md +++ b/navigation/README.md @@ -18,7 +18,7 @@ ## 🚀 How to use - Install packages with `yarn` or `npm install`. -- Run `yarn start` to start the bundler. +- Run `yarn start` or `npm run start` to start the bundler. - Open the project in a React runtime to try it: - iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779) - Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample) diff --git a/navigation/package.json b/navigation/package.json index 8d89e505..b65820a4 100644 --- a/navigation/package.json +++ b/navigation/package.json @@ -5,24 +5,24 @@ "@react-navigation/bottom-tabs": "~6.0.9", "@react-navigation/native": "~6.0.6", "@react-navigation/stack": "~6.0.11", - "expo": "^45.0.0", - "expo-asset": "~8.5.0", - "expo-constants": "~13.1.1", - "expo-font": "~10.1.0", - "expo-linking": "~3.1.0", - "expo-splash-screen": "~0.15.1", - "expo-status-bar": "~1.3.0", - "expo-web-browser": "~10.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-gesture-handler": "~2.2.1", - "react-native-reanimated": "~2.8.0", - "react-native-safe-area-context": "4.2.4", - "react-native-screens": "~3.11.1", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-asset": "~8.6.1", + "expo-constants": "~13.2.3", + "expo-font": "~10.2.0", + "expo-linking": "~3.2.2", + "expo-splash-screen": "~0.16.1", + "expo-status-bar": "~1.4.0", + "expo-web-browser": "~11.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-gesture-handler": "~2.5.0", + "react-native-reanimated": "~2.9.1", + "react-native-safe-area-context": "4.3.1", + "react-native-screens": "~3.15.0", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/upgrade-dependencies.sh b/upgrade-dependencies.sh new file mode 100644 index 00000000..1d635ca4 --- /dev/null +++ b/upgrade-dependencies.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +if [ "$1" == "" ] || [ "$1" == "--help" ]; then + echo "Available flags:" + echo "--help" + echo "--run-expo-upgrade - run yarn and expo-cli upgrade to update to latest SDK on all examples" + echo "--run-fix-dependencies - run npx expo install --fix on all repos" + exit 0 +fi + +if [ "$1" == "--run-expo-upgrade" ]; then + echo "Upgrading all projects to the latest SDK..." + echo "For each example, this will run `yarn` and then run `expo-cli upgrade`, accepting all defaults." + echo "Upgrade logs will be written to .sdk-upgrade-logs." + + mkdir ./.sdk-upgrade-logs + for d in */ ; do + DIRNAME=${d%/} + echo "Upgrading $DIRNAME..." + echo "• Run yarn" + (cd $DIRNAME && yarn --silent) # If yarn fails spectacularly, we'll see evidence in the logs for expo upgrade + echo "• Run expo upgrade" + (cd $DIRNAME && echo y | expo-cli upgrade > ../.sdk-upgrade-logs/$DIRNAME.txt) + done + + # yarn workspaces has example(s) inside of app folder + echo "• Run expo upgrade on apps inside with-yarn-workspaces" + mkdir ./.sdk-upgrade-logs/with-yarn-workspaces + for d in with-yarn-workspaces/apps/*/ ; do + (cd $DIRNAME && echo y | expo-cli upgrade > ../.sdk-upgrade-logs/$DIRNAME.txt) + done + + echo "Upgrades complete! Check .sdk-upgrade-logs for results. Be sure to correct any errors or warnings." + exit 0 +fi + +if [ "$1" == "--run-fix-dependencies" ]; then + echo "Fixing dependencies on all examples..." + + mkdir ./.sdk-upgrade-logs + for d in */ ; do + DIRNAME=${d%/} + echo "Fixing dependencies on $DIRNAME..." + (cd $DIRNAME && npx expo install --fix) + done + + echo "Fixing dependencies on apps inside with-yarn-workspaces..." + mkdir ./.sdk-upgrade-logs/with-yarn-workspaces + for d in with-yarn-workspaces/apps/*/ ; do + (cd $DIRNAME && npx expo install --fix) + done + + echo "Dependency fixes complete!" + exit 0 +fi + +echo "Error: flag not recognized" \ No newline at end of file diff --git a/with-apollo/README.md b/with-apollo/README.md index 5959db21..9f1f7401 100644 --- a/with-apollo/README.md +++ b/with-apollo/README.md @@ -12,7 +12,7 @@ ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run `expo start` to try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-apollo/package.json b/with-apollo/package.json index 4585eada..87bef863 100644 --- a/with-apollo/package.json +++ b/with-apollo/package.json @@ -2,15 +2,15 @@ "dependencies": { "@apollo/client": "^3.4.16", "@apollo/link-context": "^2.0.0-beta.3", - "@react-native-picker/picker": "2.4.0", - "expo": "^45.0.0", + "@react-native-picker/picker": "2.4.2", + "expo": "^46.0.0", "graphql": "^15.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-auth0/README.md b/with-auth0/README.md index 92dcabf9..298a13d9 100644 --- a/with-auth0/README.md +++ b/with-auth0/README.md @@ -15,7 +15,7 @@ - Create your own app on [Auth0](https://auth0.com). - Add the `AuthSession` auth URL to `Allowed Callback URLs` on Auth0. - Open `App.js` and replace `auth0ClientId` and `auth0Domain` with your app settings. -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. #### AuthSession callback URL diff --git a/with-auth0/package.json b/with-auth0/package.json index 449543c4..6b6f726c 100644 --- a/with-auth0/package.json +++ b/with-auth0/package.json @@ -1,15 +1,15 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-auth-session": "~3.6.0", - "expo-random": "~12.2.0", + "expo": "^46.0.0", + "expo-auth-session": "~3.7.1", + "expo-random": "~12.3.0", "jwt-decode": "2.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-aws-storage-upload/README.md b/with-aws-storage-upload/README.md index e60f9c46..4894226d 100644 --- a/with-aws-storage-upload/README.md +++ b/with-aws-storage-upload/README.md @@ -18,4 +18,4 @@ Try it at https://exp.host/@ykbryan/aws-storage-upload ### Running the app - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. diff --git a/with-aws-storage-upload/package.json b/with-aws-storage-upload/package.json index 76705bea..638b8fcd 100644 --- a/with-aws-storage-upload/package.json +++ b/with-aws-storage-upload/package.json @@ -4,18 +4,18 @@ "@aws-amplify/core": "^4.3.3", "@aws-amplify/storage": "^4.4.4", "@react-native-async-storage/async-storage": "~1.17.3", - "@react-native-community/netinfo": "8.2.0", + "@react-native-community/netinfo": "9.3.0", "aws-amplify": "^4.3.3", - "expo": "^45.0.0", - "expo-clipboard": "~3.0.1", - "expo-constants": "~13.1.1", - "expo-image-picker": "~13.1.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-clipboard": "~3.1.0", + "expo-constants": "~13.2.3", + "expo-image-picker": "~13.3.1", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-camera/README.md b/with-camera/README.md index ba8ca0b4..7c3c0928 100644 --- a/with-camera/README.md +++ b/with-camera/README.md @@ -21,7 +21,7 @@ This example shows how to take a picture and display it. - Install packages with `yarn` or `npm install`. - If you have native iOS code run `npx pod-install` -- Run `yarn start` to start the bundler. +- Run `yarn start` or `npm run start` to start the bundler. - Open the project in a React runtime to try it: - iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779) - Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample) diff --git a/with-camera/package.json b/with-camera/package.json index ac6d5613..5d854e74 100644 --- a/with-camera/package.json +++ b/with-camera/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-camera": "~12.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-camera": "~12.3.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-custom-font/package.json b/with-custom-font/package.json index 400e910c..9eae188a 100644 --- a/with-custom-font/package.json +++ b/with-custom-font/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-font": "~10.1.0", - "expo-splash-screen": "~0.15.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-font": "~10.2.0", + "expo-splash-screen": "~0.16.1", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-dev-client/README.md b/with-dev-client/README.md index 4c751e74..ffc89aa2 100644 --- a/with-dev-client/README.md +++ b/with-dev-client/README.md @@ -13,7 +13,7 @@ Experiment with Development Client in SDK 40. > `npx create-react-native-app my-app -t with-dev-client` -- Run `expo start --dev-client`, try it out. +- Run `expo start --dev-client` to try it out. ## 🏗 Build with EAS diff --git a/with-dev-client/package.json b/with-dev-client/package.json index 44d19dd6..bf41add8 100644 --- a/with-dev-client/package.json +++ b/with-dev-client/package.json @@ -6,18 +6,18 @@ "web": "expo start --web" }, "dependencies": { - "expo": "^45.0.0", - "expo-dev-client": "~0.9.5", - "expo-splash-screen": "~0.15.1", - "expo-status-bar": "~1.3.0", - "expo-updates": "~0.13.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-dev-client": "~1.1.1", + "expo-splash-screen": "~0.16.1", + "expo-status-bar": "~1.4.0", + "expo-updates": "~0.14.3", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" }, "name": "with-dev-client", "version": "1.0.0" diff --git a/with-drawer-navigation/README.md b/with-drawer-navigation/README.md index 3f520e92..0ebedf41 100644 --- a/with-drawer-navigation/README.md +++ b/with-drawer-navigation/README.md @@ -12,9 +12,10 @@ ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run `expo start` to try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes - This is a very basic example from the [react navigation](https://reactnavigation.org/) docs. - [Drawer navigation documentation](https://reactnavigation.org/docs/drawer-based-navigation). +- [Reanimated Babel plugin may be required](https://github.com/software-mansion/react-native-reanimated/issues/3410) diff --git a/with-drawer-navigation/babel.config.js b/with-drawer-navigation/babel.config.js index 2900afe9..9496d67d 100644 --- a/with-drawer-navigation/babel.config.js +++ b/with-drawer-navigation/babel.config.js @@ -2,5 +2,6 @@ module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], + plugins: ['react-native-reanimated/plugin'] }; }; diff --git a/with-drawer-navigation/package.json b/with-drawer-navigation/package.json index fcc9c16b..ff7b7d91 100644 --- a/with-drawer-navigation/package.json +++ b/with-drawer-navigation/package.json @@ -1,19 +1,20 @@ { "dependencies": { - "@react-native-community/masked-view": "0.1.10", - "@react-navigation/drawer": "^6.1.8", - "@react-navigation/native": "^6.0.6", - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-gesture-handler": "~2.2.1", - "react-native-reanimated": "~2.8.0", - "react-native-safe-area-context": "4.2.4", - "react-native-screens": "~3.11.1", - "react-native-web": "0.17.7" + "@react-native-masked-view/masked-view": "0.2.7", + "@react-navigation/bottom-tabs": "^6.3.2", + "@react-navigation/drawer": "^6.4.3", + "@react-navigation/native": "^6.0.11", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-gesture-handler": "~2.5.0", + "react-native-reanimated": "~2.9.1", + "react-native-safe-area-context": "4.3.1", + "react-native-screens": "~3.15.0", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-electron/README.md b/with-electron/README.md index 50dd3087..5cb90507 100644 --- a/with-electron/README.md +++ b/with-electron/README.md @@ -20,5 +20,6 @@ For more info [check out the latest docs!](https://github.com/expo/expo/blob/mas ## 📝 Notes - [Known issue with app entry](https://github.com/expo/expo-cli/issues/1385) +- [Background on 'require not defined' error](https://github.com/electron/electron-quick-start/issues/463#issuecomment-869219170). If needed, this fix can be applied after running `yarn expo-electron customize` to allow customization of additional electron files. [electron]: https://www.electronjs.org/ diff --git a/with-electron/electron/main/index.js b/with-electron/electron/main/index.js new file mode 100644 index 00000000..d30852af --- /dev/null +++ b/with-electron/electron/main/index.js @@ -0,0 +1,63 @@ +'use strict'; + +import { app, BrowserWindow } from 'electron'; +import * as path from 'path'; +import { format as formatUrl } from 'url'; + +const isDevelopment = process.env.NODE_ENV !== 'production'; + +// global reference to mainWindow (necessary to prevent window from being garbage collected) +let mainWindow; + +function createMainWindow() { + const browserWindow = new BrowserWindow({ webPreferences: { nodeIntegration: true, contextIsolation: false } }); + + if (isDevelopment) { + browserWindow.webContents.openDevTools(); + } + + if (isDevelopment) { + browserWindow.loadURL(`http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}`); + } else { + browserWindow.loadURL( + formatUrl({ + pathname: path.join(__dirname, 'index.html'), + protocol: 'file', + slashes: true, + }) + ); + } + + browserWindow.on('closed', () => { + mainWindow = null; + }); + + browserWindow.webContents.on('devtools-opened', () => { + browserWindow.focus(); + setImmediate(() => { + browserWindow.focus(); + }); + }); + + return browserWindow; +} + +// quit application when all windows are closed +app.on('window-all-closed', () => { + // on macOS it is common for applications to stay open until the user explicitly quits + if (process.platform !== 'darwin') { + app.quit(); + } +}); + +app.on('activate', () => { + // on macOS it is common to re-create a window even after all windows have been closed + if (mainWindow === null) { + mainWindow = createMainWindow(); + } +}); + +// create main BrowserWindow when electron is ready +app.on('ready', () => { + mainWindow = createMainWindow(); +}); diff --git a/with-electron/electron/webpack.config.js b/with-electron/electron/webpack.config.js new file mode 100644 index 00000000..d816a4de --- /dev/null +++ b/with-electron/electron/webpack.config.js @@ -0,0 +1,5 @@ +const { withExpoWebpack } = require('@expo/electron-adapter'); + +module.exports = config => { + return withExpoWebpack(config); +}; diff --git a/with-electron/package.json b/with-electron/package.json index e975f4c3..627f9cb6 100755 --- a/with-electron/package.json +++ b/with-electron/package.json @@ -5,21 +5,20 @@ "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", - "web": "expo start --web", - "eject": "expo eject" + "web": "expo start --web" }, "dependencies": { - "@expo/electron-adapter": "~0.0.3", - "@expo/webpack-config": "~0.16.21", - "electron": "6.1.10", - "expo": "^45.0.0", - "expo-linear-gradient": "~11.3.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "@expo/electron-adapter": "~0.0.55", + "@expo/webpack-config": "^0.17.0", + "electron": "20.0.0", + "expo": "^46.0.0", + "expo-linear-gradient": "~11.4.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-facebook-auth/README.md b/with-facebook-auth/README.md index 53f76c81..335e9325 100644 --- a/with-facebook-auth/README.md +++ b/with-facebook-auth/README.md @@ -9,7 +9,7 @@ Try it at https://expo.dev/@community/with-facebook-auth ### Running the app - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. - Press "Open FB Auth" in the app and then check your logs. Take the `redirectUrl` that was logged and enter it into the "Valid OAuth redirect URIs" in your Facebook app configuration step below. ### Setting up the Facebook app diff --git a/with-facebook-auth/package.json b/with-facebook-auth/package.json index 198be95c..bdcf5c60 100644 --- a/with-facebook-auth/package.json +++ b/with-facebook-auth/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-auth-session": "~3.6.0", - "expo-random": "~12.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-auth-session": "~3.7.1", + "expo-random": "~12.3.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-firebase-saml-login/README.md b/with-firebase-saml-login/README.md index 6c4d5a0a..383c31a8 100644 --- a/with-firebase-saml-login/README.md +++ b/with-firebase-saml-login/README.md @@ -15,7 +15,7 @@ As this example relies on Firebase authentication you must have a Firebase proje ## Running the app - Run `yarn` or `npm install` -- Run `expo start` in the root directory to start the development server. +- Run `yarn start` or `npm run start` in the root directory to start the development server. ## The idea behind the example diff --git a/with-firebase-saml-login/package.json b/with-firebase-saml-login/package.json index b4a192fb..012c70ef 100644 --- a/with-firebase-saml-login/package.json +++ b/with-firebase-saml-login/package.json @@ -4,15 +4,15 @@ }, "dependencies": { "@react-native-async-storage/async-storage": "~1.17.3", - "expo": "^45.0.0", - "expo-linking": "~3.1.0", - "expo-web-browser": "~10.2.0", + "expo": "^46.0.0", + "expo-linking": "~3.2.2", + "expo-web-browser": "~11.0.0", "firebase": "^9.6.9", - "react": "17.0.2", - "react-native": "0.68.2" + "react": "18.0.0", + "react-native": "0.69.4" }, "devDependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.18.6", "serve": "^13.0.2" } } diff --git a/with-firebase-storage-upload/README.md b/with-firebase-storage-upload/README.md index a266b3a3..54114e2e 100644 --- a/with-firebase-storage-upload/README.md +++ b/with-firebase-storage-upload/README.md @@ -12,7 +12,7 @@ This example demonstrates how you can upload images (and other files) to Firebas ## 🚀 How to use - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. - Take a new picture or upload one from your library - See the image being rendered from Firebase diff --git a/with-firebase-storage-upload/package.json b/with-firebase-storage-upload/package.json index 2e66dd20..ba4eaa12 100644 --- a/with-firebase-storage-upload/package.json +++ b/with-firebase-storage-upload/package.json @@ -1,16 +1,16 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-clipboard": "~3.0.1", - "expo-image-picker": "~13.1.1", + "expo": "^46.0.0", + "expo-clipboard": "~3.1.0", + "expo-image-picker": "~13.3.1", "firebase": "^9.6.9", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "uuid": "3.4.0" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-formdata-image-upload/README.md b/with-formdata-image-upload/README.md index f13f7a11..293b3ca7 100644 --- a/with-formdata-image-upload/README.md +++ b/with-formdata-image-upload/README.md @@ -3,7 +3,7 @@ ### Running the app - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ### Running the server diff --git a/with-formdata-image-upload/backend/README.md b/with-formdata-image-upload/backend/README.md index aea8b135..aba6b996 100644 --- a/with-formdata-image-upload/backend/README.md +++ b/with-formdata-image-upload/backend/README.md @@ -4,7 +4,7 @@ 2. Fill in your AWS credentials in `.env` -3. `npm start` +3. `npm run start` 4. Update the `apiUrl` in `frontend` to point to the server. diff --git a/with-formdata-image-upload/package.json b/with-formdata-image-upload/package.json index d75a6032..57ba4578 100644 --- a/with-formdata-image-upload/package.json +++ b/with-formdata-image-upload/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-constants": "~13.1.1", - "expo-image-picker": "~13.1.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-constants": "~13.2.3", + "expo-image-picker": "~13.3.1", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-formik/README.md b/with-formik/README.md index 9dc514af..0af0ecf5 100644 --- a/with-formik/README.md +++ b/with-formik/README.md @@ -18,7 +18,7 @@ ## 🚀 How to use - Install packages with `yarn` or `npm install`. -- Run `expo start` to try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-formik/package.json b/with-formik/package.json index 9fdfe557..d8fe267f 100644 --- a/with-formik/package.json +++ b/with-formik/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "formik": "~2.2.9", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "yup": "0.32.11" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-gatsby/README.md b/with-gatsby/README.md index 2e3d3ac4..349a42f4 100644 --- a/with-gatsby/README.md +++ b/with-gatsby/README.md @@ -6,6 +6,9 @@ Using Gatsby with Expo will enable you to [prerender](https://www.netlify.com/bl > Notice: Prerendering is an experimental feature with Expo so modules might not be fully optimized for Gatsby. If you find bugs please report them on the [Expo repo](https://github.com/expo/expo/issues) with the `[Gatsby]` tag in the title. +### Prerequisites +- May need to install `libjpeg` and `libvips` on Apple Silicon prior to running `yarn` (`brew install libjpeg; brew install libvips`). + ### ⚽️ Running in the browser - Create Expo project `expo init` diff --git a/with-gatsby/package.json b/with-gatsby/package.json index 9d260e6b..148a9b1d 100644 --- a/with-gatsby/package.json +++ b/with-gatsby/package.json @@ -3,37 +3,39 @@ "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", - "eject": "expo eject", "web": "gatsby develop", "build:web": "gatsby build", "serve:web": "gatsby serve" }, "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "gatsby": "^2.17.6", "gatsby-image": "^2.2.30", "gatsby-plugin-manifest": "^2.2.25", "gatsby-plugin-offline": "^3.0.17", "gatsby-plugin-react-helmet": "^3.1.13", - "gatsby-plugin-react-native-web": "^3.0.0-beta.1", + "gatsby-plugin-react-native-web": "^3.1.0", "gatsby-plugin-sharp": "^2.2.34", "gatsby-plugin-typescript": "^2.1.15", "gatsby-plugin-webpack-bundle-analyzer": "^1.0.5", "gatsby-source-filesystem": "^2.1.35", "gatsby-transformer-sharp": "^2.3.1", - "react": "17.0.2", - "react-dom": "17.0.2", + "react": "18.0.0", + "react-dom": "18.0.0", "react-helmet": "^5.2.1", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "react-native-web-hooks": "~3.0.1" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@types/react": "~17.0.21", - "@types/react-dom": "~17.0.11", - "@types/react-native": "~0.67.6", - "typescript": "~4.3.5" + "@babel/core": "^7.18.6", + "@types/react": "~18.0.0", + "@types/react-dom": "~18.0.0", + "@types/react-native": "~0.69.1", + "typescript": "^4.6.3" + }, + "resolutions": { + "remark-mdx": "1.6.22" }, "private": true } diff --git a/with-google-vision/package.json b/with-google-vision/package.json index f206e50d..93fe52f6 100644 --- a/with-google-vision/package.json +++ b/with-google-vision/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-image-picker": "~13.1.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-image-picker": "~13.3.1", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-icons/package.json b/with-icons/package.json index b57853db..dedf1d83 100644 --- a/with-icons/package.json +++ b/with-icons/package.json @@ -1,13 +1,13 @@ { "dependencies": { "@expo/vector-icons": "^13.0.0", - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-magic/README.md b/with-magic/README.md index 71e4b86e..2c30b8e7 100644 --- a/with-magic/README.md +++ b/with-magic/README.md @@ -12,7 +12,7 @@ - Install with `yarn` or `npm install`. - Create your own app on [Magic.link](https://magic.link). - Open `App.js` and replace `MAGIC_KEY` with your publishable key. -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-magic/package.json b/with-magic/package.json index f3b838c9..3187bfc3 100644 --- a/with-magic/package.json +++ b/with-magic/package.json @@ -1,14 +1,14 @@ { "dependencies": { "@magic-sdk/react-native": "^6.2.0", - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", - "react-native-webview": "11.18.1" + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", + "react-native-webview": "11.23.0" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-maps/README.md b/with-maps/README.md index 057643a2..c2be9507 100644 --- a/with-maps/README.md +++ b/with-maps/README.md @@ -14,17 +14,16 @@ ## 🚀 How to use - Install packages with `yarn` or `npm install`. -- Run `yarn start` or `npm start` to start the bundler. +- Run `yarn start` or `npm run start` to start the bundler. - Open the project in a React runtime to try it: - iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779) - Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample) -## Adding Native Code +## Running/Modifying Native Code -This project can be run from Expo client app. You may find that you want to add more native code later on. You can do this by ejecting the project and rebuilding it yourself. +You can generate native iOS and Android projects from your Expo config file (**app.json**/ **app.config.js**) by runnning `npx expo prebuild`. These native projects can then be compiled and run via XCode and Android Studio. -- Run `yarn eject` to create the native projects. -- You can still run your project on Expo client, you just won't be able to access any new native modules you add. +> 💡 Learn more about [native code in Expo](https://docs.expo.dev/workflow/customizing/) ## Publishing diff --git a/with-maps/package.json b/with-maps/package.json index d6d5b70b..33967c0f 100644 --- a/with-maps/package.json +++ b/with-maps/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-maps": "0.30.1", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-maps": "0.31.1", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-moti/README.md b/with-moti/README.md index d66fce7f..ddf343a4 100644 --- a/with-moti/README.md +++ b/with-moti/README.md @@ -21,7 +21,7 @@ - Install packages with `yarn` or `npm install`. - If you have native iOS code run `npx pod-install` -- Run `yarn start` to start the bundler. +- Run `yarn start` or `npm run start` to start the bundler. - Open the project in a React runtime to try it: - iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779) - Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample) @@ -33,16 +33,13 @@ Moti is built with TypeScript and has first-class support. Here's how to add TS support to your project: - Rename `App.js` ➜ `App.tsx` -- Run `expo start` -- TypeScript will be automatically configured. +- Run `yarn start` or `npm run start` -- TypeScript will be automatically configured. > 💡 Learn more about [TypeScript in Expo](https://docs.expo.dev/guides/typescript/) -### Adding Native Code +## Running/Modifying Native Code -This project can be run from a web browser or the Expo client app. You may find that you want to add more native code later on. You can do this by ejecting the project and rebuilding it yourself. - -- Run `expo eject` to create the native projects. -- You can still run your project in the web browser or Expo client, you just won't be able to access any new native modules you add. +You can generate native iOS and Android projects from your Expo config file (**app.json**/ **app.config.js**) by runnning `npx expo prebuild`. These native projects can then be compiled and run via XCode and Android Studio. > 💡 Learn more about [native code in Expo](https://docs.expo.dev/workflow/customizing/) diff --git a/with-moti/package.json b/with-moti/package.json index 3d751d84..15e16ce1 100644 --- a/with-moti/package.json +++ b/with-moti/package.json @@ -1,15 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "moti": "^0.11.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-reanimated": "~2.8.0", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-reanimated": "~2.9.1", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@expo/webpack-config": "~0.16.21" + "@babel/core": "^7.18.6" } } diff --git a/with-moti/webpack.config.js b/with-moti/webpack.config.js deleted file mode 100644 index c84f0e47..00000000 --- a/with-moti/webpack.config.js +++ /dev/null @@ -1,13 +0,0 @@ -const createExpoWebpackConfigAsync = require('@expo/webpack-config') - -module.exports = async function (env, argv) { - const config = await createExpoWebpackConfigAsync( - { - ...env, - babel: { dangerouslyAddModulePathsToTranspile: ['moti'] }, - }, - argv - ) - - return config -} \ No newline at end of file diff --git a/with-native-base/README.md b/with-native-base/README.md index 74fec6ef..cfccd92f 100644 --- a/with-native-base/README.md +++ b/with-native-base/README.md @@ -12,7 +12,7 @@ npx create-react-native-app -t with-native-base ``` -- Run `expo start`, try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-native-base/package.json b/with-native-base/package.json index d3d5d326..42d23705 100644 --- a/with-native-base/package.json +++ b/with-native-base/package.json @@ -1,15 +1,15 @@ { "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "native-base": "3.4.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-safe-area-context": "4.2.4", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-safe-area-context": "4.3.1", "react-native-svg": "12.3.0", - "react-native-web": "0.17.7" + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-nextjs/package.json b/with-nextjs/package.json index cb7d4bd8..de7fca18 100644 --- a/with-nextjs/package.json +++ b/with-nextjs/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "next": "9.3.5", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.18.6", "@expo/next-adapter": "~2.1.52" }, "scripts": { diff --git a/with-pdf/package.json b/with-pdf/package.json index 017f98e0..fb4ae341 100644 --- a/with-pdf/package.json +++ b/with-pdf/package.json @@ -5,18 +5,18 @@ "ios": "expo run:ios" }, "dependencies": { - "expo": "^45.0.0", - "expo-dev-client": "~0.9.5", - "expo-splash-screen": "~0.15.1", - "expo-status-bar": "~1.3.0", + "expo": "^46.0.0", + "expo-dev-client": "~1.1.1", + "expo-splash-screen": "~0.16.1", + "expo-status-bar": "~1.4.0", "fbjs": "^3.0.2", - "react": "17.0.2", - "react-native": "0.68.2", + "react": "18.0.0", + "react-native": "0.69.4", "react-native-blob-util": "^0.13.18", "react-native-pdf": "^6.4.0" }, "devDependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.18.6", "@config-plugins/react-native-blob-util": "^0.0.0", "@config-plugins/react-native-pdf": "^0.0.0" } diff --git a/with-postpublish-hooks/README.md b/with-postpublish-hooks/README.md index 54b8665e..eb688a66 100644 --- a/with-postpublish-hooks/README.md +++ b/with-postpublish-hooks/README.md @@ -18,4 +18,4 @@ It's common to need to perform a set of tasks once you publish an update to your #### Running the app - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. diff --git a/with-postpublish-hooks/package.json b/with-postpublish-hooks/package.json index 23414c54..f335d79d 100644 --- a/with-postpublish-hooks/package.json +++ b/with-postpublish-hooks/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "expo-postpublish-slack-notify": "1.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-preact/package.json b/with-preact/package.json index a3e79898..e2ee8ae3 100644 --- a/with-preact/package.json +++ b/with-preact/package.json @@ -1,16 +1,16 @@ { "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "preact": "10.4.1", "preact-responder-event-plugin": "1.0.16", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@expo/webpack-config": "~0.16.21", + "@babel/core": "^7.18.6", + "@expo/webpack-config": "^0.17.0", "webpack-bundle-analyzer": "3.7.0" } } diff --git a/with-processing/README.md b/with-processing/README.md index 2fac5dcc..94602e00 100644 --- a/with-processing/README.md +++ b/with-processing/README.md @@ -20,7 +20,7 @@ Example demonstrating use of the [`processing-js`](https://github.com/processing ## 🚀 How to use - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-processing/package.json b/with-processing/package.json index 2d8804fa..f1c3944c 100644 --- a/with-processing/package.json +++ b/with-processing/package.json @@ -1,15 +1,15 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-gl": "~11.3.0", + "expo": "^46.0.0", + "expo-gl": "~11.4.0", "expo-processing": "^2.0.6", "processing-js": "^1.6.6", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-react-native-elements/README.md b/with-react-native-elements/README.md index 7316e3d4..601b0d91 100644 --- a/with-react-native-elements/README.md +++ b/with-react-native-elements/README.md @@ -20,7 +20,7 @@ Example demonstrating use of the [`react-native-elements`][rne] library in Expo. ## 🚀 How to use - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-react-native-elements/package.json b/with-react-native-elements/package.json index e2fc804c..833910bd 100644 --- a/with-react-native-elements/package.json +++ b/with-react-native-elements/package.json @@ -1,17 +1,17 @@ { "dependencies": { "@expo/vector-icons": "^13.0.0", - "expo": "^45.0.0", - "expo-font": "~10.1.0", - "expo-splash-screen": "^0.15.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", + "expo": "^46.0.0", + "expo-font": "~10.2.0", + "expo-splash-screen": "~0.16.1", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", "react-native-elements": "^3.4.2", - "react-native-safe-area-context": "4.2.4", - "react-native-web": "0.17.7" + "react-native-safe-area-context": "4.3.1", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-react-router/package.json b/with-react-router/package.json index cee9524a..eb884dcb 100644 --- a/with-react-router/package.json +++ b/with-react-router/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "react-router-dom": "5.3.0", "react-router-native": "5.2.1" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-react-three-fiber/App.js b/with-react-three-fiber/App.js index e7f0118c..6ee02a23 100644 --- a/with-react-three-fiber/App.js +++ b/with-react-three-fiber/App.js @@ -1,6 +1,6 @@ import { useRef, useState } from "react"; import { StyleSheet, View } from "react-native"; -import { Canvas, useFrame } from "react-three-fiber"; +import { Canvas, useFrame } from "@react-three/fiber"; function Box(props) { // This reference will give us direct access to the mesh diff --git a/with-react-three-fiber/README.md b/with-react-three-fiber/README.md index bce425e8..2762a16e 100644 --- a/with-react-three-fiber/README.md +++ b/with-react-three-fiber/README.md @@ -16,7 +16,7 @@ Create Three.js projects using React components and props! > `npx create-react-native-app my-app -t with-react-three-fiber` - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-react-three-fiber/package.json b/with-react-three-fiber/package.json index eb228dbd..f9c7b5f9 100644 --- a/with-react-three-fiber/package.json +++ b/with-react-three-fiber/package.json @@ -1,16 +1,19 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-gl": "~11.3.0", - "expo-three": "~5.7.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", - "react-three-fiber": "^5.3.19", - "three": "^0.122.0" + "@react-three/fiber": "^8.3.1", + "expo": "^46.0.0", + "expo-asset": "~8.6.1", + "expo-file-system": "~14.1.0", + "expo-gl": "~11.4.0", + "expo-modules-core": "~0.11.3", + "expo-three": "^6.1.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", + "three": "^0.143.0" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-realm/package.json b/with-realm/package.json index 66e3b5e8..a9c2da08 100644 --- a/with-realm/package.json +++ b/with-realm/package.json @@ -6,10 +6,10 @@ }, "dependencies": { "@realm/react": "^0.1.0", - "expo": "^45.0.0", - "expo-dev-client": "~0.9.5", - "react": "17.0.2", - "react-native": "0.68.2", + "expo": "^46.0.0", + "expo-dev-client": "~1.1.1", + "react": "18.0.0", + "react-native": "0.69.4", "react-native-get-random-values": "~1.8.0", "realm": "^10.11.0" } diff --git a/with-reanimated/README.md b/with-reanimated/README.md index b71a7d4e..7e5d67b4 100644 --- a/with-reanimated/README.md +++ b/with-reanimated/README.md @@ -13,7 +13,7 @@ > `npx create-react-native-app my-app -t with-reanimated` - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-reanimated/package.json b/with-reanimated/package.json index 8dfe499f..52e4c654 100644 --- a/with-reanimated/package.json +++ b/with-reanimated/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-status-bar": "~1.3.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-reanimated": "~2.8.0", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-status-bar": "~1.4.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-reanimated": "~2.9.1", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-socket-io/README.md b/with-socket-io/README.md index 06bc1f98..098fccda 100644 --- a/with-socket-io/README.md +++ b/with-socket-io/README.md @@ -23,11 +23,11 @@ This example shows how to connect and interact with socket-io backends. - Run `yarn` or `npm install` - Open `App.js` and change the `socketEndpoint` at the top of the file to point to your endpoint. -- Open `app` with [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Open `app` with `yarn start` or `npm run start` to try it out. ### Running the server -- `cd` into the `backend` directory and run `yarn` or `npm install`, then run `yarn start` +- `cd` into the `backend` directory and run `yarn` or `npm install`, then run `yarn start` or `npm run start` - Install [ngrok](https://ngrok.com/download) and run `ngrok http 3000` and copy the https url that looks something like this `https://f7333e87.ngrok.io`. ## 📝 Notes diff --git a/with-socket-io/package.json b/with-socket-io/package.json index f55781ef..dccb9f15 100644 --- a/with-socket-io/package.json +++ b/with-socket-io/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "socket.io-client": "^4.3.2" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-splash-screen/App.js b/with-splash-screen/App.js index 7e403c45..7400af92 100644 --- a/with-splash-screen/App.js +++ b/with-splash-screen/App.js @@ -53,7 +53,7 @@ function AnimatedSplashScreen({ children, image }) { if (isAppReady) { Animated.timing(animation, { toValue: 0, - duration: 200, + duration: 1000, useNativeDriver: true, }).start(() => setAnimationComplete(true)); } diff --git a/with-splash-screen/README.md b/with-splash-screen/README.md index d5adf797..08129096 100644 --- a/with-splash-screen/README.md +++ b/with-splash-screen/README.md @@ -14,11 +14,10 @@ This example shows you how to create an animated splash screen for your app. It ## 🚀 How to use - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. - Wait until the app is built and downloaded. Press "run again" to reload the app and splash screen. ## 📝 Notes -- [Expo AppLoading docs](https://docs.expo.dev/versions/latest/sdk/app-loading/) - [Expo Assets guide](https://docs.expo.dev/versions/latest/guides/assets/) - [Expo Splash Screen guide](https://docs.expo.dev/versions/latest/guides/splash-screens/) diff --git a/with-splash-screen/package.json b/with-splash-screen/package.json index ec081a58..ad763447 100644 --- a/with-splash-screen/package.json +++ b/with-splash-screen/package.json @@ -1,16 +1,16 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-asset": "~8.5.0", - "expo-constants": "~13.1.1", - "expo-splash-screen": "~0.15.1", - "expo-updates": "~0.13.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-asset": "~8.6.1", + "expo-constants": "~13.2.3", + "expo-splash-screen": "~0.16.1", + "expo-updates": "~0.14.3", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-sqlite/README.md b/with-sqlite/README.md index 6618b242..32010091 100644 --- a/with-sqlite/README.md +++ b/with-sqlite/README.md @@ -18,7 +18,7 @@ inserting items, querying and displaying results, using prepared statements. ## 🚀 How to use - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-sqlite/package.json b/with-sqlite/package.json index 813a660a..7bf9b3cc 100644 --- a/with-sqlite/package.json +++ b/with-sqlite/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-sqlite": "~10.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-sqlite": "~10.3.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-storybook/README.md b/with-storybook/README.md index 0c6199f9..39a3c1a7 100644 --- a/with-storybook/README.md +++ b/with-storybook/README.md @@ -105,7 +105,7 @@ export const text = () => ( /_ Example JSX _/ ); ``` -- Now run `expo start` to see it in action! +- Now run `yarn start` or `npm run start` to see it in action! ### 📁 File Structure diff --git a/with-storybook/package.json b/with-storybook/package.json index 1156da48..623ca4c1 100644 --- a/with-storybook/package.json +++ b/with-storybook/package.json @@ -5,27 +5,27 @@ "build-storybook": "build-storybook" }, "dependencies": { - "expo": "^45.0.0", - "expo-constants": "~13.1.1", - "expo-font": "~10.1.0", - "expo-linear-gradient": "~11.3.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-constants": "~13.2.3", + "expo-font": "~10.2.0", + "expo-linear-gradient": "~11.4.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@expo/webpack-config": "~0.16.21", + "@babel/core": "^7.18.6", + "@expo/webpack-config": "^0.17.0", "@storybook/addon-actions": "~5.2.1", "@storybook/addon-links": "~5.2.1", "@storybook/addons": "~5.2.1", "@storybook/react": "~5.2.1", "@storybook/react-native": "~5.3.19", - "@types/react": "~17.0.21", - "@types/react-dom": "~17.0.11", - "@types/react-native": "~0.67.6", + "@types/react": "~18.0.0", + "@types/react-dom": "~18.0.0", + "@types/react-native": "~0.69.1", "babel-loader": "^8.0.6", - "typescript": "~4.3.5" + "typescript": "^4.6.3" } } diff --git a/with-styled-components/README.md b/with-styled-components/README.md index 8fdf0f70..c3ba94f7 100644 --- a/with-styled-components/README.md +++ b/with-styled-components/README.md @@ -12,7 +12,7 @@ ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-styled-components/package.json b/with-styled-components/package.json index 427e787a..9ca1d08f 100644 --- a/with-styled-components/package.json +++ b/with-styled-components/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "styled-components": "^5.1.0" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-svg/README.md b/with-svg/README.md index b7545c89..8ed976bf 100644 --- a/with-svg/README.md +++ b/with-svg/README.md @@ -7,7 +7,7 @@ Import SVG files directly as React components. ### Running the app - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ### Setup diff --git a/with-svg/package.json b/with-svg/package.json index c48062c1..f9c6088e 100644 --- a/with-svg/package.json +++ b/with-svg/package.json @@ -1,17 +1,17 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", "react-native-svg": "12.3.0", "react-native-svg-transformer": "^0.14.3", - "react-native-web": "0.17.7" + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.18.6", "@expo/metro-config": "^0.1.57", - "@expo/webpack-config": "~0.16.21", + "@expo/webpack-config": "^0.17.0", "@svgr/webpack": "^5.5.0" } } diff --git a/with-tab-navigation/README.md b/with-tab-navigation/README.md index 20443e85..cd1065f9 100644 --- a/with-tab-navigation/README.md +++ b/with-tab-navigation/README.md @@ -12,7 +12,7 @@ ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run `expo start` to try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-tab-navigation/package.json b/with-tab-navigation/package.json index 7b4748c1..02c5d7f6 100644 --- a/with-tab-navigation/package.json +++ b/with-tab-navigation/package.json @@ -1,28 +1,27 @@ { "dependencies": { "@expo/vector-icons": "^13.0.0", - "@react-native-community/masked-view": "0.1.10", - "@react-navigation/bottom-tabs": "~6.0.9", - "@react-navigation/native": "~6.0.6", - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-gesture-handler": "~2.2.1", - "react-native-reanimated": "~2.8.0", - "react-native-safe-area-context": "4.2.4", - "react-native-screens": "~3.11.1", - "react-native-web": "0.17.7" + "@react-native-masked-view/masked-view": "0.2.7", + "@react-navigation/bottom-tabs": "^6.3.2", + "@react-navigation/native": "^6.0.11", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-gesture-handler": "~2.5.0", + "react-native-reanimated": "~2.9.1", + "react-native-safe-area-context": "4.3.1", + "react-native-screens": "~3.15.0", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" }, "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", - "web": "expo start --web", - "eject": "expo eject" + "web": "expo start --web" }, "private": true } diff --git a/with-tailwindcss/README.md b/with-tailwindcss/README.md index 8de263d9..3740ac91 100644 --- a/with-tailwindcss/README.md +++ b/with-tailwindcss/README.md @@ -12,7 +12,7 @@ ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run `expo start` to try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-tailwindcss/package.json b/with-tailwindcss/package.json index ebaa3e86..048335a6 100644 --- a/with-tailwindcss/package.json +++ b/with-tailwindcss/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "tailwind-rn": "^3.0.1" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-tfjs-camera/README.md b/with-tfjs-camera/README.md index 07ef201d..f3de2c87 100644 --- a/with-tfjs-camera/README.md +++ b/with-tfjs-camera/README.md @@ -13,7 +13,7 @@ Identify objects in real time using `@tensorflow/tfjs`, `expo-camera`, and `expo > `npx create-react-native-app my-app -t with-tfjs-camera` -- Run `expo start`, open on a native device (simulator, emulator, and browser are not supported). +- Run `yarn start` or `npm run start`, open on a native device (simulator, emulator, and browser are not supported). - You can swap out `@tensorflow-models/mobilenet` for another [TensorFlow model](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md) to achieve different results. ## 📝 Notes diff --git a/with-tfjs-camera/package.json b/with-tfjs-camera/package.json index 15776eec..0e0343e1 100644 --- a/with-tfjs-camera/package.json +++ b/with-tfjs-camera/package.json @@ -4,16 +4,16 @@ "@tensorflow-models/mobilenet": "^2.1.0", "@tensorflow/tfjs": "^3.10.0", "@tensorflow/tfjs-react-native": "^0.7.0", - "expo": "^45.0.0", - "expo-camera": "~12.2.0", - "expo-gl": "~11.3.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", + "expo": "^46.0.0", + "expo-camera": "~12.3.0", + "expo-gl": "~11.4.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", "react-native-fs": "^2.16.6", - "react-native-web": "0.17.7" + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-three/README.md b/with-three/README.md index b2bacdb5..58ef382d 100644 --- a/with-three/README.md +++ b/with-three/README.md @@ -12,7 +12,7 @@ ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out **on a device** (this will not work on the iOS simulator). ## 📝 Notes diff --git a/with-three/package.json b/with-three/package.json index afe1d781..3963013a 100644 --- a/with-three/package.json +++ b/with-three/package.json @@ -1,15 +1,18 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-gl": "~11.3.0", - "expo-three": "~5.7.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", - "three": "^0.122.0" + "expo": "^46.0.0", + "expo-asset": "~8.6.1", + "expo-file-system": "~14.1.0", + "expo-gl": "~11.4.0", + "expo-modules-core": "~0.11.3", + "expo-three": "^6.1.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", + "three": "^0.143.0" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-twitter-auth/README.md b/with-twitter-auth/README.md index 07e963b4..d86c92dc 100644 --- a/with-twitter-auth/README.md +++ b/with-twitter-auth/README.md @@ -30,7 +30,7 @@ The purpose of the backend is to store the Twitter API keys without leaking this - Install with `yarn` or `npm install` - Open `App.js` and replace `requestTokenURL` and `accessTokenURL` with your backend URLs -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out +- Run `yarn start` or `npm run start` to try it out ### 📁 File Structure diff --git a/with-twitter-auth/package.json b/with-twitter-auth/package.json index 198be95c..bdcf5c60 100644 --- a/with-twitter-auth/package.json +++ b/with-twitter-auth/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-auth-session": "~3.6.0", - "expo-random": "~12.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-auth-session": "~3.7.1", + "expo-random": "~12.3.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-typescript/README.md b/with-typescript/README.md index db65fc10..19876922 100644 --- a/with-typescript/README.md +++ b/with-typescript/README.md @@ -26,7 +26,7 @@ TypeScript is a superset of JavaScript which gives you static types and powerful ### Adding TypeScript to existing projects - Create a blank TypeScript config: `touch tsconfig.json` -- Run `expo start` to automatically configure TypeScript +- Run `yarn start` or `npm run start` to automatically configure TypeScript - Rename files to TypeScript, `.tsx` for React components and `.ts` for plain typescript files > 💡 You can disable the TypeScript setup in Expo CLI with the environment variable `EXPO_NO_TYPESCRIPT_SETUP=1 expo start` diff --git a/with-typescript/package.json b/with-typescript/package.json index 1265019f..e7edc189 100644 --- a/with-typescript/package.json +++ b/with-typescript/package.json @@ -1,15 +1,15 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@types/react": "~17.0.21", - "@types/react-native": "~0.67.6", - "typescript": "~4.3.5" + "@babel/core": "^7.18.6", + "@types/react": "~18.0.0", + "@types/react-native": "~0.69.1", + "typescript": "^4.6.3" } } diff --git a/with-victory-native/README.md b/with-victory-native/README.md index b71a2408..6cf7f707 100644 --- a/with-victory-native/README.md +++ b/with-victory-native/README.md @@ -5,7 +5,7 @@ ## Running the app - Run `yarn` or `npm install` -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), to try it out! +- Run `yarn start` or `npm run start`, to try it out! ## The idea behind the example diff --git a/with-victory-native/package.json b/with-victory-native/package.json index d4adbbd7..1871fc6a 100644 --- a/with-victory-native/package.json +++ b/with-victory-native/package.json @@ -1,16 +1,16 @@ { "dependencies": { - "@expo/webpack-config": "~0.16.21", - "expo": "^45.0.0", - "expo-font": "~10.1.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", + "@expo/webpack-config": "^0.17.0", + "expo": "^46.0.0", + "expo-font": "~10.2.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", "react-native-svg": "12.3.0", - "react-native-web": "0.17.7", + "react-native-web": "~0.18.7", "victory-native": "^35.5.5" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-video-background/README.md b/with-video-background/README.md index 4e2c4d10..b4afcd28 100644 --- a/with-video-background/README.md +++ b/with-video-background/README.md @@ -6,7 +6,5 @@ Video backgrounds are common in mobile apps. This shows you how to do it univers - Install: `yarn` -- [Expo CLI](https://docs.expo.dev/versions/latest/workflow/expo-cli/): `npm install -g expo-cli` (if not already installed globally on your machine) - -- Run Project Locally: `expo start` +- Run Project Locally: `yarn start` or `npm run start` diff --git a/with-video-background/package.json b/with-video-background/package.json index 6411978f..abacedf1 100644 --- a/with-video-background/package.json +++ b/with-video-background/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-av": "~11.2.3", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-av": "~12.0.3", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-webbrowser-redirect/README.md b/with-webbrowser-redirect/README.md index 2cb73c03..6eff38c7 100644 --- a/with-webbrowser-redirect/README.md +++ b/with-webbrowser-redirect/README.md @@ -3,7 +3,7 @@ ### Running the app - Run `yarn` or `npm install` -- Open `app` with [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Open `app` with `yarn start` or `npm run start` to try it out. ## The idea behind the example diff --git a/with-webbrowser-redirect/package.json b/with-webbrowser-redirect/package.json index 83ab4c6c..5c0c1674 100644 --- a/with-webbrowser-redirect/package.json +++ b/with-webbrowser-redirect/package.json @@ -1,14 +1,14 @@ { "dependencies": { - "expo": "^45.0.0", - "expo-linking": "~3.1.0", - "expo-web-browser": "~10.2.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "expo-linking": "~3.2.2", + "expo-web-browser": "~11.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } } diff --git a/with-webrtc/package.json b/with-webrtc/package.json index a35e5be2..bc8fedab 100644 --- a/with-webrtc/package.json +++ b/with-webrtc/package.json @@ -5,18 +5,18 @@ "ios": "expo run:ios" }, "dependencies": { - "expo": "^45.0.0", - "expo-dev-client": "~0.9.5", - "expo-splash-screen": "~0.15.1", - "expo-status-bar": "~1.3.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "expo": "^46.0.0", + "expo-dev-client": "~1.1.1", + "expo-splash-screen": "~0.16.1", + "expo-status-bar": "~1.4.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "react-native-webrtc": "^1.94.1" }, "devDependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.18.6", "@config-plugins/react-native-webrtc": "^2.0.1" }, "name": "with-webrtc", diff --git a/with-workbox/package.json b/with-workbox/package.json index efd2704e..19b43fd3 100644 --- a/with-workbox/package.json +++ b/with-workbox/package.json @@ -3,15 +3,15 @@ "serve": "serve web-build" }, "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@expo/webpack-config": "~0.16.21", + "@babel/core": "^7.18.6", + "@expo/webpack-config": "^0.17.0", "serve": "^12.0.0", "workbox-background-sync": "^6.1.5", "workbox-broadcast-update": "^6.1.5", diff --git a/with-yarn-workspaces/.gitignore b/with-yarn-workspaces/.gitignore index 36a27f25..b8eadb0c 100644 --- a/with-yarn-workspaces/.gitignore +++ b/with-yarn-workspaces/.gitignore @@ -50,3 +50,6 @@ xcuserdata # VSCode .history/ + +# packages +packages/*/build \ No newline at end of file diff --git a/with-yarn-workspaces/README.md b/with-yarn-workspaces/README.md index 63be4a24..953600c4 100644 --- a/with-yarn-workspaces/README.md +++ b/with-yarn-workspaces/README.md @@ -15,14 +15,15 @@

-Demonstrates the use of `expo-yarn-workspaces` with Expo. -This example installs a monorepo with two applications, both using two separate custom packages. +Demonstrates the use of a Yarn Workspace Monorepo with Expo. +This example installs a monorepo with an application using a separate custom package. ## 🚀 How to use - Create a new monorepo with `npx create-react-native-app --template with-yarn-workspaces`. - - Packages will be automatically installed via the `postinstall` script in `package.json` -- Run `yarn app` to start the app. +- Run `yarn watch-packages` to build and watch the packages. +- Run `yarn start-app` to start the app. +- Edit the code in **packages/expo-custom/src** and watch it live-reload in the app! ### 📁 File Structure @@ -37,16 +38,10 @@ This example installs a monorepo with two applications, both using two separate │ └── expo-custom │ └── src/index.tsx ➡️ exports a custom message which is imported and displayed in the app │ └── src/tsconfig.json ➡️ default TypeScript configuration for expo-module-scripts -├── package.json ➡️ contains the `postinstall` script and scripts with yarn commands to run applications +├── package.json ➡️ contains yarn commands to run applications └── babel.config.js ➡️ Babel config (should be using `babel-preset-expo`) ``` ## 📝 Notes -This example uses [expo-yarn-workspaces](https://github.com/expo/expo/tree/master/packages/expo-yarn-workspaces) to facilitate running the app inside of a monorepo. It also uses [expo-module-scripts](https://github.com/expo/expo/tree/master/packages/expo-module-scripts) to build the library in `packages/expo-custom`. An alternative to expo-module-scripts is [react-native-builder-bob](https://github.com/callstack/react-native-builder-bob). - -Please note that there are currently a few of quirks with using monorepos with EAS Build and with `expo prebuild` / `expo run:[ios|android]`. This example handles those automatically, but you need to be aware of them. - -1. Expo SDK packages should be added to the `"symlinks"` list in `package.json`. -2. `index.js` is used instead of expo-yarn-workspaces' default `__generated__/AppEntry.js` because React Native's `bundle` command does not respect the `"main"` field in `package.json`, so we can't use it here. -3. `metro.config.js` must extend `expo-yarn-workspaces`'s default configuration. This automatically extends `@expo/metro-config`. [Learn about customizing metro.config.js](https://docs.expo.dev/guides/customizing-metro/). +This example uses the configuration described in the [Expo Monorepos Guide](https://docs.expo.dev/guides/monorepos/) diff --git a/with-yarn-workspaces/apps/mobile/app.json b/with-yarn-workspaces/apps/mobile/app.json deleted file mode 100644 index 0967ef42..00000000 --- a/with-yarn-workspaces/apps/mobile/app.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/with-yarn-workspaces/apps/mobile/metro.config.js b/with-yarn-workspaces/apps/mobile/metro.config.js index 4cbce8fb..7057cce9 100644 --- a/with-yarn-workspaces/apps/mobile/metro.config.js +++ b/with-yarn-workspaces/apps/mobile/metro.config.js @@ -1,3 +1,18 @@ -const { createMetroConfiguration } = require('expo-yarn-workspaces'); +const { getDefaultConfig } = require('expo/metro-config'); +const path = require('path'); -module.exports = createMetroConfiguration(__dirname); +// Find the workspace root, this can be replaced with `find-yarn-workspace-root` +const workspaceRoot = path.resolve(__dirname, '../..'); +const projectRoot = __dirname; + +const config = getDefaultConfig(projectRoot); + +// 1. Watch all files within the monorepo +config.watchFolders = [workspaceRoot]; +// 2. Let Metro know where to resolve packages, and in what order +config.resolver.nodeModulesPaths = [ + path.resolve(projectRoot, 'node_modules'), + path.resolve(workspaceRoot, 'node_modules'), +]; + +module.exports = config; \ No newline at end of file diff --git a/with-yarn-workspaces/apps/mobile/package.json b/with-yarn-workspaces/apps/mobile/package.json index 4bdec51e..6b344876 100644 --- a/with-yarn-workspaces/apps/mobile/package.json +++ b/with-yarn-workspaces/apps/mobile/package.json @@ -2,65 +2,24 @@ "name": "mobile", "version": "1.0.0", "private": true, + "main": "index.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", - "eject": "expo eject", - "build": "echo 'Nothing to build'", - "postinstall": "expo-yarn-workspaces postinstall" + "build": "echo 'Nothing to build'" }, "dependencies": { - "expo": "^45.0.0", + "expo": "^46.0.0", "expo-custom": "*", - "expo-status-bar": "~1.3.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7" + "expo-status-bar": "~1.4.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7" }, "devDependencies": { "@babel/core": "~7.9.0" - }, - "expo-yarn-workspaces": { - "symlinks": [ - "@unimodules/core", - "@unimodules/react-native-adapter", - "expo-application", - "expo-asset", - "expo-constants", - "expo-error-recovery", - "expo-file-system", - "expo-font", - "expo-image-loader", - "expo-keep-awake", - "expo-modules-core", - "expo-splash-screen", - "expo-structured-headers", - "expo-updates-interface", - "expo-updates", - "unimodules-app-loader", - "unimodules-task-manager-interface" - ] - }, - "react-native-unimodules": { - "android": { - "modulesPaths": [ - "../../../../", - "../../../../packages" - ], - "configuration": "api", - "target": "react-native" - }, - "ios": { - "modules_paths": [ - "../../../", - "../../../packages" - ], - "flags": { - "inhibit_warnings": false - } - } } } diff --git a/with-yarn-workspaces/package.json b/with-yarn-workspaces/package.json index 0e48314b..8e0b6082 100644 --- a/with-yarn-workspaces/package.json +++ b/with-yarn-workspaces/package.json @@ -1,14 +1,11 @@ { "private": true, "scripts": { - "postinstall": "expo-yarn-workspaces check-workspace-dependencies && yarn workspaces run build", - "app": "yarn workspace @expo/app expo start" + "start-app": "yarn workspace mobile start", + "watch-packages": "yarn workspaces run build" }, "workspaces": [ "apps/*", "packages/*" - ], - "devDependencies": { - "expo-yarn-workspaces": "^1.5.0" - } + ] } diff --git a/with-zustand/README.md b/with-zustand/README.md index 1aba4e12..1399e850 100644 --- a/with-zustand/README.md +++ b/with-zustand/README.md @@ -15,7 +15,7 @@ This example implements a basic store and list using the `zustand` library. ## 🚀 How to use - Install with `yarn` or `npm install`. -- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out. +- Run `yarn start` or `npm run start` to try it out. ## 📝 Notes diff --git a/with-zustand/package.json b/with-zustand/package.json index 4b03b656..b95c7363 100644 --- a/with-zustand/package.json +++ b/with-zustand/package.json @@ -1,13 +1,13 @@ { "dependencies": { - "expo": "^45.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.68.2", - "react-native-web": "0.17.7", + "expo": "^46.0.0", + "react": "18.0.0", + "react-dom": "18.0.0", + "react-native": "0.69.4", + "react-native-web": "~0.18.7", "zustand": "^3.6.7" }, "devDependencies": { - "@babel/core": "^7.12.9" + "@babel/core": "^7.18.6" } }