How to use the @react-navigation/native.createNavigatorFactory function in @react-navigation/native

To help you get started, we’ve selected a few @react-navigation/native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-navigation / navigation-ex / packages / material-bottom-tabs / src / navigators / createMaterialBottomTabNavigator.tsx View on Github external
backBehavior,
    children,
    screenOptions,
  });

  return (
    
  );
}

export default createNavigatorFactory<
  MaterialBottomTabNavigationOptions,
  typeof MaterialBottomTabNavigator
>(MaterialBottomTabNavigator);
github react-navigation / navigation-ex / packages / compat / src / createSwitchNavigator.tsx View on Github external
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)
);
github react-navigation / navigation-ex / packages / material-top-tabs / src / navigators / createMaterialTopTabNavigator.tsx View on Github external
backBehavior,
    children,
    screenOptions,
  });

  return (
    
  );
}

export default createNavigatorFactory<
  MaterialTopTabNavigationOptions,
  typeof MaterialTopTabNavigator
>(MaterialTopTabNavigator);
github react-navigation / navigation-ex / packages / native-stack / src / navigators / createNativeStackNavigator.tsx View on Github external
});
      }),
    [navigation, state.index, state.key]
  );

  return (
    
  );
}

export default createNavigatorFactory<
  NativeStackNavigationOptions,
  typeof NativeStackNavigator
>(NativeStackNavigator);
github react-navigation / navigation-ex / packages / drawer / src / navigators / createDrawerNavigator.tsx View on Github external
initialRouteName,
    children,
    screenOptions,
  });

  return (
    
  );
}

export default createNavigatorFactory<
  DrawerNavigationOptions,
  typeof DrawerNavigator
>(DrawerNavigator);
github callstack / react-native-paper / example / src / SimpleNavigator.tsx View on Github external
{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);
github react-navigation / navigation-ex / packages / bottom-tabs / src / navigators / createBottomTabNavigator.tsx View on Github external
backBehavior,
    children,
    screenOptions,
  });

  return (
    
  );
}

export default createNavigatorFactory<
  BottomTabNavigationOptions,
  typeof BottomTabNavigator
>(BottomTabNavigator);
github react-navigation / navigation-ex / packages / stack / src / navigators / createStackNavigator.tsx View on Github external
});
      }),
    [navigation, state.index, state.key]
  );

  return (
    
  );
}

export default createNavigatorFactory<
  StackNavigationOptions,
  typeof StackNavigator
>(StackNavigator);