Miss any of our Open RFC calls?Watch the recordings here! »

@react-navigation/core

5.11.1 • Public • Published

@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);

Install

npm i @react-navigation/core

DownloadsWeekly Downloads

286,153

Version

5.11.1

License

MIT

Unpacked Size

914 kB

Total Files

274

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar