How to avoid push a specific universal link with expo-router? #25153
Unanswered
jaybowang
asked this question in
Archived: Questions
Replies: 3 comments 1 reply
-
I have the same problem in a personal project. The user is on the registration screen /app/(register)/email, he will receive an email with the link https://domain.com/validation/email, in the project there is no such route. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have the exact same problem |
Beta Was this translation helpful? Give feedback.
0 replies
-
The solution is simple. Just create those missing folders and a _layout file. For example https://domain.com/validation/email // step one: create a folder named validation, create a subfolder named email.
// step two: create a _layout.tsx file in the email folder
// ./app/validation/email/_layout.tsx
import { Stack } from 'expo-router/stack';
export default function MyLayout() {
return (
<Stack>
<Stack.Screen
name='my-target-route'
// or href='..'
options={{ animation: 'none' }}
/>
</Stack>
);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use
native-wechat
for login with WeChat app.It navigates from WeChat app back to my app with a universal link like
https://app.domain.com/app/wechat-appId/oauth?code=codeFromWeChatPlatform&state=
.The problem is that expo-router automatically pushes to
/app/wechat-appId/oauth
which is a undefined route.What I really need is do not push to any routes.
I checked the docs and haven't got any idea. Any comments is highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions