O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

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

Setting up a navigator

One of the most popular features in React Native is the navigator. This component allows us to add or remove views easily. When we add a new view, the navigator will transition with a nice animation to the new view, and when removing the latest view, the navigator will go to the previous view with a nice animation as well.

Getting ready

Before we start working on this recipe, we need to create a new app using the React Native CLI--let's name it UsingNavigator. We are going to create a simple music app similar to Spotify. At the home page, we will display a list of songs, and we are going to display the details, whenever any of these songs are tapped.

For this recipe, we are going to use three classes, so let's create an src ...

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