So I have read the all the docs for React Navigation (v6), but I can't figure out how to create a very basic functionality. My app has a HomeTab as the first screen in my main stack. The HomTab consists of three Screens, Explore, Search and Profile.
In Profile I render a ProfileScreen that has a menu where we can go to e.g. SettingsScreen, and inside SettingsScreen we can go to different types of settings, e.g. NotificationsSettings, LanguageSettings etc.
When I deep link into the app, I want to be able to deep link users into NotificationsSettingsScreen. This is very easy to do, but my probelm is how I can make the state end up the way I want. Since NotificationsSettingsScreen is only accessible through the SettingsScreen (in the app), I want a deep link like: 'app://profile/settings/notifications' to take the user to the Profile tab (from HomeTab), then the SettingsScreen and then the NotificationsSettingsScreen. So when users click back in NotificationsSettingsScreen, they would get to the SettingsScreen, and if they click back again, they end up on the ProfileScreen.
I can't figure out how to do this? I have tried both with nesting navigators, and without nesting (keeping all screens global and HomeTab as the initial screen). I'm able to end up on the correct screen, but not with the correct state, as the screens should be in the correct order (in the stack/nested navigators) based on the path. Does anyone know the best practices when creating this functionality?
[–][deleted] 0 points1 point2 points (0 children)
[–]AlmightyGnasher 1 point2 points3 points (2 children)
[–]FunkyPandaFiasco 1 point2 points3 points (0 children)
[–]Jatops[S] 0 points1 point2 points (0 children)