How to use the @react-navigation/routers.StackActions.pop function in @react-navigation/routers

To help you get started, we’ve selected a few @react-navigation/routers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-navigation / navigation-ex / packages / stack / src / views / Stack / StackView.tsx View on Github external
private handleGoBack = ({ route }: { route: Route }) => {
    const { state, navigation } = this.props;

    // This event will trigger when a gesture ends
    // We need to perform the transition before removing the route completely
    navigation.dispatch({
      ...StackActions.pop(),
      source: route.key,
      target: state.key,
    });
  };
github react-navigation / navigation-ex / packages / compat / src / StackActions.tsx View on Github external
export function pop({ n = 1 }: { n: number }): StackActionType {
  return StackActions.pop(n);
}
github react-navigation / navigation-ex / packages / stack / src / views / Header / Header.tsx View on Github external
? () =>
              navigation.dispatch({
                ...StackActions.pop(),
                source: scene.route.key,
              })
          : undefined
github react-navigation / navigation-ex / packages / native-stack / src / views / NativeStackView.tsx View on Github external
onDismissed={() => {
              navigation.dispatch({
                ...StackActions.pop(),
                source: route.key,
                target: state.key,
              });
            }}
          >