How to use the @react-navigation/native.CommonActions.goBack function in @react-navigation/native

To help you get started, we’ve selected a few @react-navigation/native 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 / compat / src / NavigationActions.tsx View on Github external
export function back(options?: { key?: null | string }) {
  return options?.key != null
    ? (state: NavigationState) => ({
        ...CommonActions.goBack(),
        source: options.key,
        target: state.key,
      })
    : CommonActions.goBack();
}
github react-navigation / navigation-ex / packages / compat / src / NavigationActions.tsx View on Github external
? (state: NavigationState) => ({
        ...CommonActions.goBack(),
        source: options.key,
        target: state.key,
      })
    : CommonActions.goBack();