Socket
Socket
Sign inDemoInstall

@react-navigation/core

Package Overview
Dependencies
13
Maintainers
6
Versions
230
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @react-navigation/core

Core utilities for building navigators


Version published
Weekly downloads
719K
decreased by-17.24%
Maintainers
6
Install size
1.10 MB
Created
Weekly downloads
 

Readme

Source

@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, NavigationContent } =
    useNavigationBuilder(StackRouter, {
      initialRouteName,
      children,
    });

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

export default createNavigatorFactory(StackNavigator);

Keywords

FAQs

Last updated on 18 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc