The differences between Navigator and NavigatorIOS are a common source of confusion for newcomers.
Both Navigator
and NavigatorIOS
are components that allow you to
manage the navigation in your app between various "scenes" (another word
for screens). They manage a route stack and allow you to pop, push, and
replace states. In this way, they are similar to the html5 history
API.
The primary distinction between the two is that NavigatorIOS
leverages
the iOS
UINavigationController
class, and Navigator
re-implements that functionality entirely in
JavaScript as a React component. A corollary of this is that Navigator
will be compatible with Android and iOS, whereas NavigatorIOS
will
only work on the one platform. Below is an itemized list of differences
between the two.
NavigatorIOS
bar: Navigator.NavigationBar
, and another with breadcrumbs called Navigator.BreadcrumbNavigationBar
. See the UIExplorer demo to try them out and see how to use them.NavigatorIOS
.navigationBar
prop.Navigator
in its current form.For most non-trivial apps, you will want to use Navigator
- it won't be long before you run into issues when trying to do anything complex with NavigatorIOS
.