Stack.Group
Apply shared options to a set of stack screens.
App.tsx
<Stack.Group navigationKey="Personal"> <Stack.Screen name="Notes" component={Notes} /> <Stack.Screen name="Editor" component={Editor} /></Stack.Group>Notes
Personal notebookMy notes
Use the Group returned by createStackNavigator inside its Navigator. Group screens when they share configuration or should reset together. A group adds no route to the back stack.
For example, if the user switches accounts, change navigationKey to discard the previous account's routes in the group.
<Stack.Group navigationKey={accountId}>
<Stack.Screen name="Notes" component={Notes} />
<Stack.Screen name="Editor" component={Editor} />
</Stack.Group>To give several screens common defaults, set screenOptions on the group. Individual screens can override those options. Stack.Navigator