UmnountOnBlur in createMaterialTopTabNavigator

1.9k views Asked by At

How to unmount my screen when i change my tab. I am using createMaterialTopTabNavigator() from @react-navigation/material-top-tabs package.

i have tried to add unmonuntOnBlur in options but it doesnt work.

            <Tab.Screen name="addIdentity" component={addIdentityStack} options={{ title: 'Add Identity', unmountOnBlur: true }} />
            <Tab.Screen name="addVehicle" component={addVehicle} options={{ title: 'Add Vehicle', unmountOnBlur: true }} />
1

There are 1 answers

2
Guruparan Giritharan On

The option 'unMountOnBlur' is not supported in material top navigator you can check the supported options here https://reactnavigation.org/docs/material-top-tab-navigator/#options

Only drawer navigator and bottom tab navigator has this option