Routers define a component's navigation state, and they allow the developer to define paths and actions that can be handled.
react-navigation ships with a few standard routers:
To make a navigator manually, put a static
router on a component.
Now you can use this component as a
screen in another navigator, and the navigation logic for
MyNavigator will be defined by this
See the Custom Router API spec to learn about the API of
TabRouter. You can override the router functions as you see fit:
Custom Navigation Actions
To override navigation behavior, you can override the navigation state logic in
getStateForAction, and manually manipulate the
Blocking Navigation Actions
Sometimes you may want to prevent some navigation activity, depending on your route.
Handling Custom URIs
Perhaps your app has a unique URI which the built-in routers cannot handle. You can always extend the router