React Nitro

Tab.Group

Apply shared options to a set of tab screens.

App.tsx
<Tab.Group screenOptions={{  lazy: false,}}>  <Tab.Screen name="Notes"    component={Notes} />  <Tab.Screen name="Map"    component={MapScreen} /></Tab.Group><Tab.Screen name="Inbox"  component={Inbox} />
Notes
Mounted screensNotes · mountedMap · mountedInbox · waiting
Notes and Map mount together. Open Inbox to mount the tab outside the group, then switch away to see that it stays mounted.

Place Tab.Group inside the Tab.Navigator returned by createBottomTabNavigator. Its screenOptions apply to every enclosed tab unless a screen overrides them.

In this example, both tab screens mount as soon as the navigator renders. Each keeps its own tab bar item.

<Tab.Group screenOptions={{ lazy: false }}>
  <Tab.Screen name="Notes" component={Notes} />
  <Tab.Screen name="Map" component={MapScreen} />
</Tab.Group>

Keep other tabs outside the group to retain their default lazy mounting behavior. Tab.Screen