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

@storybook/router

Package Overview
Dependencies
Maintainers
12
Versions
1794
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/router

Core Storybook Router

  • 5.2.0-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.1M
increased by1.2%
Maintainers
12
Weekly downloads
 
Created

What is @storybook/router?

@storybook/router is a package used within the Storybook ecosystem to handle routing. It provides utilities to manage navigation and URL state within Storybook, making it easier to create and manage complex story hierarchies and navigation patterns.

What are @storybook/router's main functionalities?

Route Handling

The Route component allows you to define a route and associate it with a specific component. This is useful for rendering different components based on the URL path.

import { Route } from '@storybook/router';

<Route path="/my-component" component={MyComponent} />;

Link Component

The Link component is used to create navigational links within Storybook. It helps in navigating to different routes defined in the Storybook environment.

import { Link } from '@storybook/router';

<Link to="/my-component">Go to My Component</Link>;

Location Context

The Location component provides access to the current location object, which includes information like the current pathname. This is useful for conditionally rendering content based on the current route.

import { Location } from '@storybook/router';

<Location>{({ pathname }) => <div>Current path: {pathname}</div>}</Location>;

Other packages similar to @storybook/router

Keywords

FAQs

Package last updated on 18 Jul 2019

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