Stack-based navigation is the most basic form of navigation that can be added to React Native applications. Our entire application can be imagined as a stack; initially, we have the home screen on that stack. This home screen is the first screen that shows up when we launch the application. If we want to navigate to another screen, such as the dashboard, we will push that screen onto the stack. Now the dashboard will be the visible screen. Note that whatever screen is at the top of the stack will be the screen that is currently visible to the users. Similarly, if we want to go back to the home screen, we will just pop the dashboard screen from the stack so that the current screen on the top is the home screen. The illustration below shows how stack-based navigation works.

Get hands-on with 1200+ tech skills courses.