Package Exports
- @react-navigation/core
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@react-navigation/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@react-navigation/core
Core utilities for building navigators.
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);