Skip to content

feat(expo-example): migrate to expo-router#131

Merged
andrascodes merged 1 commit into
mainfrom
andras/feat-expo-example-migrate-to-expo-router
May 14, 2026
Merged

feat(expo-example): migrate to expo-router#131
andrascodes merged 1 commit into
mainfrom
andras/feat-expo-example-migrate-to-expo-router

Conversation

@andrascodes
Copy link
Copy Markdown
Collaborator

@andrascodes andrascodes commented Apr 28, 2026

This PR is part of a stack created with Aviator.

Closes FS-2099

Decided to migrate the expo-example app to Expo Router to make the app resemble a production-grade app a bit more closely. Also, because the Magic Link callback I'm implementing in a subsequent PR works better using Expo Router.
This also caused the appearance of some bugs:

  1. Wagmi automatic reconnection triggers a React set-state-in-render warning, which I handled with opting out of reconnectOnMount and triggering the reconnect() manually in _layout
  2. The /oauth-callback was processed by Expo-Router before (or in parallel) with the Native OAuth flow. I fixed it by just adding an explicit route for it and rendering an ActivityIndicator meanwhile the Stack.Protected usage in _layout takes care of the redirection to the authenticated parts of the app. This can serve as an example of solving this issue in prod.

@@ -0,0 +1,77 @@
import 'react-native-get-random-values'
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically the only file that needs to be reviewed in this PR. The rest is just moving the files around (and fixing file references) or following the Expo docs on setting up Expo Router.
This file implements the Protected routes (authenticated routes) and fixes a bug around using Wagmi on React Native which causes an error in development (set-state-in-render - manual reconnection solves it)
The SplashScreen should show until we can determine the authenticated status. This doesn't work on Android preview because of Expo. It only works in a production build.

@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch 3 times, most recently from a3664fc to d49848a Compare May 4, 2026 13:12
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch 2 times, most recently from b9acfc8 to e917bb8 Compare May 4, 2026 16:56
@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch 2 times, most recently from 31e2f8f to fe9ea1e Compare May 5, 2026 11:02
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch 2 times, most recently from c8b20c5 to 5cc1be4 Compare May 5, 2026 11:28
@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch from fe9ea1e to 5818e6e Compare May 5, 2026 11:28
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch from 5cc1be4 to a9b678f Compare May 5, 2026 13:22
@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch 3 times, most recently from e98b159 to c466a44 Compare May 5, 2026 14:51
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch from 6a5ec4c to 49caacd Compare May 5, 2026 14:51
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch from 49caacd to 95c4d70 Compare May 6, 2026 12:18
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch from 718a845 to 8944716 Compare May 13, 2026 17:08
@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch from a36a497 to c91dd13 Compare May 13, 2026 17:08
@andrascodes andrascodes force-pushed the andras/feat-react-enable-oauth-in-react-native branch from 8944716 to 425ad67 Compare May 14, 2026 05:50
@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch from c91dd13 to 1c64fca Compare May 14, 2026 05:50
@andrascodes andrascodes changed the base branch from andras/feat-react-enable-oauth-in-react-native to main May 14, 2026 06:09
@andrascodes andrascodes force-pushed the andras/feat-expo-example-migrate-to-expo-router branch from 1c64fca to 34f2eee Compare May 14, 2026 06:09
@andrascodes andrascodes merged commit 398c93a into main May 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants