Files
Satyajit Sahoo 26ba019155 chore: publish
- @react-navigation/bottom-tabs@6.0.0-next.19
 - @react-navigation/core@6.0.0-next.14
 - @react-navigation/devtools@6.0.0-next.15
 - @react-navigation/drawer@6.0.0-next.18
 - @react-navigation/elements@1.0.0-next.18
 - flipper-plugin-react-navigation@1.2.0
 - @react-navigation/material-bottom-tabs@6.0.0-next.15
 - @react-navigation/material-top-tabs@6.0.0-next.15
 - @react-navigation/native-stack@6.0.0-next.8
 - @react-navigation/native@6.0.0-next.14
 - @react-navigation/routers@6.0.0-next.5
 - @react-navigation/stack@6.0.0-next.26
2021-06-11 01:15:43 +02:00
..
2021-06-11 01:15:43 +02:00
2020-02-01 02:43:58 +01:00
2021-06-11 01:15:43 +02:00

@react-navigation/core

Core utilities for building navigators independent of the platform.

Installation

Open a Terminal in your project's folder and run,

yarn add @react-navigation/core

Usage

A basic custom navigator bundling a router and a view looks like this:

import { createNavigatorFactory, useNavigationBuilder } from '@react-navigation/core';
import { StackRouter } from '@react-navigation/routers';

function StackNavigator({ initialRouteName, children, ...rest }) {
  const { state, navigation, descriptors } = useNavigationBuilder(StackRouter, {
    initialRouteName,
    children,
  });

  return (
    <StackView
      state={state}
      navigation={navigation}
      descriptors={descriptors}
      {...rest}
    />
  );
}

export default createNavigatorFactory(StackNavigator);