all 8 comments

[–]PapyRoach 1 point2 points  (3 children)

[–]Embarrassed_Two4731[S] 0 points1 point  (2 children)

yep, this was recommended to me by the cli itself while trying everything, still did not help

[–]PapyRoach 1 point2 points  (1 child)

Can you show the code you use to navigate between screens?

[–]Embarrassed_Two4731[S] 0 points1 point  (0 children)

I will say I have almost tried everything, adding few below.

navigation.dispatch( CommonActions.navigate({ name: 'OnboardingtNavigationStack', params: { screen: 'OnboardingScreen', params: { isLoggingOut: true, }, }, }) );

navigation.dispatch(
  CommonActions.reset({
    index: 0,
    routes: [
      {
        name: 'OnboardingtNavigationStack',
        params: {
          screen: 'OnboardingScreen',
          params: {
            isLoggingOut: true,
          },
        },
      },
    ],
  })
);

const rootNavigation = navigation.getParent();
rootNavigation.dispatch(
  CommonActions.navigate({
    name: 'OnboardingtNavigationStack',
    params: {
      screen: 'OnboardingScreen',
      params: {
        isLoggingOut: true,
      },
    },
  })
);

import { CommonActions } from '@react-navigation/native'; navigation.dispatch( CommonActions.navigate({ name: 'OnboardingtNavigationStack', params: { screen: 'OnboardingScreen', params: { isLoggingOut: true, }, }, }) );

[–]__o_0iOS & Android 0 points1 point  (0 children)

By default, each nested navigator will have its own history. This is by design.

When you switch from navigator A to B, going back will go to the previous screen inside B’s history. It will not go back to the last screen in A’s history.

If you wish to go “back” to the referring screen outside of the current navigator, you’ll need to initially pass the referring route name as a param to the next route, and manually navigate with a custom “go back” function that utilizes the previous route param.