Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-navigation/routers

Package Overview
Dependencies
Maintainers
7
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-navigation/routers

Routers to help build custom navigators

  • 7.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
increased by7.64%
Maintainers
7
Weekly downloads
 
Created

What is @react-navigation/routers?

@react-navigation/routers is a package that provides the core router functionality for React Navigation. It allows you to define and manage navigation state, handle navigation actions, and manage the history stack in a React application.

What are @react-navigation/routers's main functionalities?

Creating a Stack Router

This feature allows you to create a stack-based router, which is useful for managing navigation in a stack-like manner where screens are pushed and popped off the stack.

const { StackRouter } = require('@react-navigation/routers');

const router = StackRouter({
  Home: 'HomeScreen',
  Profile: 'ProfileScreen'
});

Creating a Tab Router

This feature allows you to create a tab-based router, which is useful for applications that use a tab bar to switch between different screens.

const { TabRouter } = require('@react-navigation/routers');

const router = TabRouter({
  Home: 'HomeScreen',
  Settings: 'SettingsScreen'
});

Handling Navigation Actions

This feature allows you to handle navigation actions such as navigating to a different screen. The router updates the navigation state based on the action.

const { StackRouter, NavigationActions } = require('@react-navigation/routers');

const router = StackRouter({
  Home: 'HomeScreen',
  Profile: 'ProfileScreen'
});

const state = router.getStateForAction(NavigationActions.navigate({ routeName: 'Profile' }));

Other packages similar to @react-navigation/routers

Keywords

FAQs

Package last updated on 06 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc