React Nitro

Stack.Navigator

Present routes on a native navigation stack.

App.tsx
<Stack.Navigator  initialRouteName="Shelf">  <Stack.Screen name="Shelf"    component={Shelf} />  <Stack.Screen name="Book"    component={Book} />  <Stack.Screen name="Note"    component={Note} /></Stack.Navigator>
Shelf
Screen stackShelf
Open a book, then a note. Go back one screen at a time to unwind the stack.

Call createStackNavigator<Routes>() from react-nitro-navigation at module scope. Its Navigator component displays the active route and hosts the native push and back transitions. Put the navigator under a NavigationContainer, either at the root or inside another screen.

Given a Stack with Notes and Editor routes, choose the first screen with initialRouteName.

<Stack.Navigator initialRouteName="Notes">
  <Stack.Screen name="Notes" component={Notes} />
  <Stack.Screen name="Editor" component={Editor} />
</Stack.Navigator>

A push adds the destination to the stack. A completed native back action pops it. Stack.Screen · Navigation