• Version 6.5.16
  • Published
  • 212 kB
  • 5 dependencies
  • MIT license


npm i @storybook/router
yarn add @storybook/router
pnpm add @storybook/router


Core Storybook Router



variable BaseLocationProvider

const BaseLocationProvider: ({
basename: basenameProp,
location: locationProp,
static: staticProp,
}: R.RouterProps) => any;

    variable DEEPLY_EQUAL

    const DEEPLY_EQUAL: Symbol;
      const Link: {
      ({ to, children, ...rest }: LinkProps): JSX.Element;
      displayName: string;

        variable Location

        const Location: { ({ children }: LocationProps): JSX.Element; displayName: string };

          variable LocationProvider

          const LocationProvider: ({
          }: R.BrowserRouterProps) => JSX.Element;

            variable Match

            const Match: {
            ({ children, path: targetPath, startsWith }: MatchProps): JSX.Element;
            displayName: string;

              variable Route

              const Route: {
              ({ path, children, startsWith, hideOnly }: RouteProps): JSX.Element;
              displayName: string;


                function buildArgsParam

                buildArgsParam: (initialArgs: Args, args: Args) => string;

                  function deepDiff

                  deepDiff: (value: any, update: any) => any;

                    function getMatch

                    getMatch: (current: string, target: string, startsWith?: any) => Match | null;

                      function parsePath

                      parsePath: (path: string | undefined) => StoryData;

                        function queryFromLocation

                        queryFromLocation: (location: Partial<Location>) => Query;

                          function queryFromString

                          queryFromString: (s: string) => Query;

                            function stringifyQuery

                            stringifyQuery: (query: Query) => string;

                              function useNavigate

                              useNavigate: () => (to: string | number, { plain, ...options }?: any) => void;


                                interface Args

                                interface Args {}

                                  index signature

                                  [key: string]: any;

                                    interface LinkProps

                                    interface LinkProps {}

                                      property children

                                      children: ReactNode;

                                        property to

                                        to: string;

                                          interface LocationProps

                                          interface LocationProps {}

                                            property children

                                            children: (renderData: RenderData) => ReactNode;

                                              interface MatchingData

                                              interface MatchingData {}

                                                property match

                                                match: null | {
                                                path: string;

                                                  interface MatchProps

                                                  interface MatchProps {}

                                                    property children

                                                    children: (matchingData: MatchingData) => ReactNode;

                                                      property path

                                                      path: string;

                                                        property startsWith

                                                        startsWith: boolean;

                                                          interface Other

                                                          interface Other extends StoryData {}

                                                            property path

                                                            path: string;

                                                              property singleStory

                                                              singleStory?: boolean;

                                                                interface Query

                                                                interface Query {}

                                                                  index signature

                                                                  [key: string]: any;

                                                                    interface RouteProps

                                                                    interface RouteProps {}

                                                                      property children

                                                                      children: ReactNode;

                                                                        property hideOnly

                                                                        hideOnly?: boolean;

                                                                          property path

                                                                          path: string;

                                                                            property startsWith

                                                                            startsWith?: boolean;

                                                                              interface StoryData

                                                                              interface StoryData {}

                                                                                property refId

                                                                                refId?: string;

                                                                                  property storyId

                                                                                  storyId?: string;

                                                                                    property viewMode

                                                                                    viewMode?: string;

                                                                                      Type Aliases

                                                                                      type Match

                                                                                      type Match = {
                                                                                      path: string;
                                                                                        type NavigateOptions = ReturnType<typeof R.useNavigate> & {
                                                                                        plain?: boolean;

                                                                                          type RenderData

                                                                                          type RenderData = Pick<RouterData, 'location'> & Other;

                                                                                            type RouterData

                                                                                            type RouterData = {
                                                                                            location: Partial<Location>;
                                                                                            navigate: ReturnType<typeof useNavigate>;
                                                                                            } & Other;

                                                                                              Package Files (1)

                                                                                              Dependencies (5)

                                                                                              Dev Dependencies (8)

                                                                                              Peer Dependencies (2)


                                                                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/router.

                                                                                              • Markdown
                                                                                              • HTML
                                                                                                <a href="https://www.jsdocs.io/package/@storybook/router"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>