Deep linking into app stays on initial route if app is closed

I am attempting to handle deep links into my Expo app. If the app is closed, then the deep link always opens on the initial route, which is my home screen. If the app is open in the background, then it works. I am not sure if I am handling deep links correctly but they match what is on the docs and all other examples around the web.

My deep linking code looks a bit like this:

  const { getInitialState } = useLinking(navigationRef, {
    prefixes: [Linking.makeUrl("/"), "https://myapp.app", "myapp://"],
    config: {
      Recipes: {
        initialRouteName: "Recipes",
        screens: {
          Recipes: "recipes",
          Recipe: "recipe/:slug"
        }
      },
      Login: "login/:code"
    }
  });

And I have included my app code in a gist. It may seem complicated since I have nested navigators on every screen :, )

  1. SDK Version: ~36.0.0
  2. Platforms(Android/iOS/web/all): Android/iOS

Recording from the iOS simulator here: https://ufile.io/pp4vjfm9
App code: App.tsx ยท GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.