-
Notifications
You must be signed in to change notification settings - Fork 14
chore: update expo-example app to work with latest expo version #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kylemcd
merged 6 commits into
main
from
kyle-kno-9091-update-expo-example-to-work-with-latest-version-of-expo
Jul 10, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
800aeb0
chore: update expo-example app to work with latest expo version
kylemcd 08e37cc
fix: type errors related to react 19 changes
kylemcd 0ce815b
fix: expo-example app lint config
kylemcd 5c993dd
fix: revert peer deps back to original
kylemcd f01ed6f
fix: add eslint dep
kylemcd 8ec28ba
fix: lock file
kylemcd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| nodejs 20.9.0 | ||
| yarn 1.22.19 | ||
| nodejs 22.17.0 | ||
| yarn 1.22.22 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "extends": ["expo", "plugin:prettier/recommended"], | ||
| "ignorePatterns": ["dist/*"], | ||
| "root": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,50 @@ | ||
| # Knock + Expo example app | ||
| # Welcome to your Expo app 👋 | ||
|
|
||
| This example app uses [Knock](https://knock.app) to power in-app notifications. It uses the [Knock Expo SDK](../../packages/expo) and [Expo](https://docs.expo.dev/). | ||
| This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). | ||
|
|
||
| > Not using Expo? See our [Knock + React Native example app](../react-native-example/README.md). | ||
| ## Get started | ||
|
|
||
| ## Running locally | ||
| 1. Install dependencies | ||
|
|
||
| 1. Install dependencies from the root of the monorepo. | ||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| ```sh | ||
| yarn | ||
| ``` | ||
| 2. Start the app | ||
|
|
||
| 2. Make sure the packages have been built by running `yarn build:packages` | ||
| ```bash | ||
| npx expo start | ||
| ``` | ||
|
|
||
| 3. Configure the environment variables. Copy `.env.sample` to `.env.development.local` and add the relevant API keys and channel id from your Knock dashboard. | ||
| In the output, you'll find options to open the app in a | ||
|
|
||
| 4. Set up your development environment to run native apps depending on your operating system and the platform you'd like to run the example on. See the [Expo docs](https://docs.expo.dev/guides/local-app-development/) for more information. | ||
| - [development build](https://docs.expo.dev/develop/development-builds/introduction/) | ||
| - [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) | ||
| - [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) | ||
| - [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo | ||
|
|
||
| 5. Run the example app. Optionally, specify which platform you'd like to run on | ||
| You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). | ||
|
|
||
| ```sh | ||
| yarn start | ||
| ## Get a fresh project | ||
|
|
||
| # Or run the app on iOS | ||
| yarn ios | ||
| When you're ready, run: | ||
|
|
||
| # Or run the app on Android | ||
| yarn android | ||
| ```bash | ||
| npm run reset-project | ||
| ``` | ||
|
|
||
| This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. | ||
|
|
||
| ## Learn more | ||
|
|
||
| To learn more about developing your project with Expo, look at the following resources: | ||
|
|
||
| - [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). | ||
| - [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. | ||
|
|
||
| ## Join the community | ||
|
|
||
| Join our community of developers creating universal apps. | ||
|
|
||
| - [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. | ||
| - [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,43 @@ | ||
| { | ||
| "expo": { | ||
| "name": "@knocklabs/expo-example", | ||
| "slug": "@knocklabs/expo-example", | ||
|
kylemcd marked this conversation as resolved.
|
||
| "name": "expo-example", | ||
| "slug": "expo-example", | ||
| "version": "1.0.0", | ||
| "orientation": "portrait", | ||
| "icon": "./assets/icon.png", | ||
| "icon": "./assets/images/icon.png", | ||
| "scheme": "expoexample", | ||
| "userInterfaceStyle": "automatic", | ||
| "splash": { | ||
| "image": "./assets/splash.png", | ||
| "resizeMode": "contain", | ||
| "backgroundColor": "#ffffff" | ||
| }, | ||
| "assetBundlePatterns": ["**/*"], | ||
| "newArchEnabled": true, | ||
| "ios": { | ||
| "supportsTablet": true | ||
| }, | ||
| "android": { | ||
| "adaptiveIcon": { | ||
| "foregroundImage": "./assets/adaptive-icon.png", | ||
| "foregroundImage": "./assets/images/adaptive-icon.png", | ||
| "backgroundColor": "#ffffff" | ||
| } | ||
| }, | ||
| "edgeToEdgeEnabled": true | ||
| }, | ||
| "web": { | ||
| "favicon": "./assets/favicon.png" | ||
| "bundler": "metro", | ||
| "output": "static", | ||
| "favicon": "./assets/images/favicon.png" | ||
| }, | ||
| "extra": { | ||
| "eas": { | ||
| "projectId": "YOUR_EAS_PROJECT_ID", | ||
| "userInterfaceStyle": "automatic", | ||
| "ios": { | ||
| "userInterfaceStyle": "automatic" | ||
| }, | ||
| "android": { | ||
| "userInterfaceStyle": "automatic" | ||
| "plugins": [ | ||
| "expo-router", | ||
| [ | ||
| "expo-splash-screen", | ||
| { | ||
| "image": "./assets/images/splash-icon.png", | ||
| "imageWidth": 200, | ||
| "resizeMode": "contain", | ||
| "backgroundColor": "#ffffff" | ||
| } | ||
| } | ||
| ] | ||
| ], | ||
| "experiments": { | ||
| "typedRoutes": true, | ||
| "reactCanary": true | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { Stack } from "expo-router"; | ||
|
|
||
| export default function RootLayout() { | ||
| return <Stack />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,17 @@ | ||
| { | ||
| "extends": "expo/tsconfig.base", | ||
| "compilerOptions": { | ||
| "jsx": "react" | ||
| "strict": true, | ||
| "paths": { | ||
| "@/*": [ | ||
| "./*" | ||
| ] | ||
| } | ||
| }, | ||
| "extends": "expo/tsconfig.base", | ||
| "include": ["src"], | ||
| "exclude": ["node_modules"] | ||
| "include": [ | ||
| "**/*.ts", | ||
| "**/*.tsx", | ||
| ".expo/types/**/*.ts", | ||
| "expo-env.d.ts" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.