@react-navigation/native#TabNavigationState TypeScript Examples

The following examples show how to use @react-navigation/native#TabNavigationState. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: createBottomTabNavigator.tsx    From nlw2-proffy with MIT License 6 votes vote down vote up
function BottomTabNavigator({
  initialRouteName,
  backBehavior,
  children,
  screenOptions,
  ...rest
}: Props) {
  const { state, descriptors, navigation } = useNavigationBuilder<
    TabNavigationState,
    TabRouterOptions,
    BottomTabNavigationOptions,
    BottomTabNavigationEventMap
  >(TabRouter, {
    initialRouteName,
    backBehavior,
    children,
    screenOptions,
  });

  return (
    <BottomTabView
      {...rest}
      state={state}
      navigation={navigation}
      descriptors={descriptors}
    />
  );
}
Example #2
Source File: createBottomTabNavigator.d.ts    From nlw2-proffy with MIT License 5 votes vote down vote up
_default: <ParamList extends Record<string, object | undefined>>() => import("@react-navigation/native").TypedNavigator<ParamList, TabNavigationState, BottomTabNavigationOptions, BottomTabNavigationEventMap, typeof BottomTabNavigator>