Socket
Book a DemoInstallSign in
Socket

@react-navigation/routers

Package Overview
Dependencies
Maintainers
7
Versions
115
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.5.1
latest
Source
npmnpm
Version published
Maintainers
7
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

react

FAQs

Package last updated on 26 Jul 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.