This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Replies: 1 comment 2 replies
-
|
I for one would love to have the linking config exposed. I'm currently dealing with handling authentication that uses a hash in the deep link URL, which Expo Router does not handle as a search param and therefore cannot find the screen needed to deal with auth tokens. This was easily achievable via React Navigation which needed a linking prop, where I could customise the config to rewrite the incoming URL to replace the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
my opinion,
expo/routerkiller-feature is provision "free" deep linking. for now linking config forNavigationContainergenerating automatically by getLinkingConfig method. Generates onlypathandscreenspropsProblem:
no way to set
initialRouteNameto linking config (react-navigation docs). its needed for some cases:initialRouteNamein linking config/profile/orders/3you needinitialRouteNameon each Navigator levels, or you get wrongbacknavigation logicneed to remember,
initialRouteNamein linking config !==initialRouteNamein Navigator props. they have different logic (hi @nandorojo react-navigation #10152)Solutions (as I can see)
expo/routercan and should solve this case automaticallyinitialRouteNamefrom Navigator and set it to linking options. i tried to do this in Add initialRouteName to linking config #45 pr. the problem is that linking config loads before Navigator rendering. i tried parse component as string, but @EvanBacon right, its stupid. but even if we find a way safety prerender or start app only after loads all screens and generated linking config,initialRouteNamefrom linking and Navigator still have different logic. i think its bad practice.initialRouteNamebased onexpo/routersorted. sounds like solution and all changes we need at /src/getLinkingConfig.ts:its will solve all problems it this case.
omg, such a simple solution that I don't know why I wrote so much. but in future I think we need tools to merge linking config with custom config.
when i starts wrote this discussion, I thought I'd end with a question: "What do you think about it?". but it seems that the solution came by itself while I was writing 🤷♂️
Beta Was this translation helpful? Give feedback.
All reactions