Problem Statement
Describe how the navigation stack works in React Navigation.
Explanation
The navigation stack works on the principle of push and pop. When a screen is opened using navigation.navigate, it’s pushed on top of the stack.
When you press the back button or call navigation.goBack(), the current screen is popped off and control returns to the previous one.