Navigator is React Native's default navigator. A Navigator component manages a stack of route objects, and provides methods for managing that stack.
Managing the Route Stack
First of all, notice the initialRoute prop. A route is simply a javascript object, and can take whatever shape you want, and have whatever values you want. It's the primary way you'll pass values and methods between components in your navigation stack.
The Navigator knows what to render based on the value returned from its renderScene prop.
Let's imagine an implementation of ExampleScene in this example:
Configuring the Navigator
You can configure the Navigator's transitions with the configureScene prop. This is a function that's passed the route object, and needs to return a configuration object. These are the available configuration objects:
You can return one of these objects without modification, or you can modify the configuration object to customize the navigation transitions. For example, to modify the edge hit width to more closely emulate the iOS UINavigationController's interactivePopGestureRecognizer:
Managing the NavigationBar
The Navigator component comes with a navigationBar prop, which can theoretically take any properly configured React component. But the most common implementation uses the default Navigator.NavigationBar. This takes a routeMapper prop that you can use to configure the appearance of the navigation bar based on the route.
A routeMapper is a regular javascript object with three functions: Title, RightButton, and LeftButton. For example: