How to use the @react-navigation/core.BaseRouter.getStateForAction function in @react-navigation/core

To help you get started, we’ve selected a few @react-navigation/core 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 / routers / src / TabRouter.tsx View on Github external
return null;
              }

              return {
                ...state,
                routeKeyHistory: state.routeKeyHistory.slice(0, -1),
                index,
              };
            }

            default:
              return null;
          }

        default:
          return BaseRouter.getStateForAction(state, action);
      }
    },
github react-navigation / navigation-ex / packages / routers / src / StackRouter.tsx View on Github external
return router.getStateForAction(
              state,
              {
                type: 'POP',
                payload: { count: 1 },
                target: action.target,
                source: action.source,
              },
              options
            );
          }

          return null;

        default:
          return BaseRouter.getStateForAction(state, action);
      }
    },