Group
Group
components are used to group several screens inside a navigator.
A Group
is returned from a createXNavigator
function:
1 |
|
After creating the navigator, it can be used as children of the Navigator
component:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
It's also possible to nest Group
components inside other Group
components.
Props¶
screenOptions
¶
Options to configure how the screens inside the group get presented in the navigator. It accepts either an object or a function returning an object:
1 2 3 4 5 6 7 |
|
When you pass a function, it'll receive the route
and navigation
:
1 2 3 4 5 6 7 |
|
These options are merged with the options
specified in the individual screens, and the screen's options will take precedence over the group's options.
See Options for screens for more details and examples.
navigationKey
¶
Optional key for a group of screens screen. If the key changes, all existing screens in this group will be removed (if used in a stack navigator) or reset (if used in a tab or drawer navigator):
1 2 3 |
|
This is similar to the navigationKey
prop on Screen
, but applies to a group of screens.