Keep home behind the deep-linked screen
Open a screen with your app's scheme, and keep home behind it so back always works.
Filipi Rafael1 min de leitura
For deep linking your app you could simply use your app's scheme as app://settings, for example.
The same works for a dynamic screen, such as a user handle.
But in order to keep the deep-linked screen above the app home, with the go back always working, you should set it in your app/_layout:
export const unstable_settings = { anchor: "(tabs)" };This way you won't face unexpected behaviors.
Also, if the user is not logged-in he won't be able to access a guarded deep-linked screen - Expo Router would automatically redirect him to login.
Compartilhar
