@baijiayunwangxiao/reactnav-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • 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);

Base version 5.16.1

This fix resolves the #9128 issue, more detail see #9408.

Package Sidebar

Install

npm i @baijiayunwangxiao/reactnav-core

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

1.06 MB

Total Files

286

Last publish

Collaborators

  • baijiayunwangxiao