Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
backBehavior,
children,
screenOptions,
});
return (
);
}
export default createNavigatorFactory<
MaterialBottomTabNavigationOptions,
typeof MaterialBottomTabNavigator
>(MaterialBottomTabNavigator);
type Props = DefaultNavigatorOptions<{}> & TabRouterOptions;
function SwitchNavigator(props: Props) {
const { state, descriptors } = useNavigationBuilder<
TabNavigationState,
TabRouterOptions,
{},
{}
>(TabRouter, props);
return descriptors[state.routes[state.index].key].render();
}
export default createCompatNavigatorFactory(
createNavigatorFactory<{}, typeof SwitchNavigator>(SwitchNavigator)
);
backBehavior,
children,
screenOptions,
});
return (
);
}
export default createNavigatorFactory<
MaterialTopTabNavigationOptions,
typeof MaterialTopTabNavigator
>(MaterialTopTabNavigator);
});
}),
[navigation, state.index, state.key]
);
return (
);
}
export default createNavigatorFactory<
NativeStackNavigationOptions,
typeof NativeStackNavigator
>(NativeStackNavigator);
initialRouteName,
children,
screenOptions,
});
return (
);
}
export default createNavigatorFactory<
DrawerNavigationOptions,
typeof DrawerNavigator
>(DrawerNavigator);
{options.headerShown !== false &&
options.header &&
options.header({
navigation,
scene: { descriptor: descriptors[route.key] },
previous:
state.index === 0
? undefined
: { descriptor: descriptors[state.routes[state.index - 1].key] },
})}
{render()}
);
}
export const createSimpleNavigator = createNavigatorFactory<
SimpleNavigatorOptions,
typeof SimpleNavigator
>(SimpleNavigator);
backBehavior,
children,
screenOptions,
});
return (
);
}
export default createNavigatorFactory<
BottomTabNavigationOptions,
typeof BottomTabNavigator
>(BottomTabNavigator);
});
}),
[navigation, state.index, state.key]
);
return (
);
}
export default createNavigatorFactory<
StackNavigationOptions,
typeof StackNavigator
>(StackNavigator);