What is React Native Navigation?

Learn about the different types of navigators in React Native.

React navigation

Up until now, we have only created single-screen apps. Now we’ll create apps with multiple screens. React Navigation is a library that helps us create navigation components in our apps. Some of the different types of navigators in React Navigation are:

  • StackNavigator
  • TabNavigator
  • DrawerNavigator

The StackNavigator

The StackNavigator is a navigator that manages a stack of screens.

It manages the navigation between all the screens of the app. When the user navigates to a new screen, the new screen is added to the top of the stack. When the user wants to go back to the previous screen, the current screen is popped from the stack.

It is very similar to how navigation works in a web browser. We use the <a> tag to create links between the pages. When the link is clicked, the page URL is pushed onto the browser history stack. We can go back to the previous screen by clicking the back button.

Get hands-on with 1400+ tech skills courses.