O'Reilly logo

Getting Started with React Native by Tom Bray, Ethan Holmes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

NoteLocationScreen

Now, since we are capturing the location of the user on note creation, we want to display this information in a useful manner. Location data perfectly matches up with showing the notes on a map UI. This way the user can visually see all of the notes that they have created. We are going to create a new component called NoteLocationScreen to house our note locations, but before writing the code for this screen, let's begin by adding the navigation.

On the home screen, we want to have a Map button in the navbar to transition to the NoteLocationScreen. Update the LeftButton and Title in NavigationBarRouteMapper to the following:

var NavigationBarRouteMapper = { LeftButton: function(route, navigator, index, navState) { switch (route.name) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required