@types/react-router-config

  • Version 5.0.11
  • Published
  • 5.88 kB
  • 3 dependencies
  • MIT license

Install

npm i @types/react-router-config
yarn add @types/react-router-config
pnpm add @types/react-router-config

Overview

TypeScript definitions for react-router-config

Index

Functions

function matchRoutes

matchRoutes: <
Params extends { [K in keyof Params]?: string },
TRouteConfig extends RouteConfig = RouteConfig
>(
routes: TRouteConfig[],
pathname: string
) => Array<MatchedRoute<Params, TRouteConfig>>;

    function renderRoutes

    renderRoutes: (
    routes: RouteConfig[] | undefined,
    extraProps?: any,
    switchProps?: SwitchProps
    ) => React.JSX.Element;

      Interfaces

      interface MatchedRoute

      interface MatchedRoute<
      Params extends { [K in keyof Params]?: string },
      TRouteConfig extends RouteConfig = RouteConfig
      > {}

        property match

        match: match<Params>;

          property route

          route: TRouteConfig;

            interface RouteConfig

            interface RouteConfig {}

              property component

              component?:
              | React.ComponentType<RouteConfigComponentProps<any>>
              | React.ComponentType
              | undefined;

                property exact

                exact?: boolean | undefined;

                  property key

                  key?: React.Key | undefined;

                    property location

                    location?: Location | undefined;

                      property path

                      path?: string | string[] | undefined;

                        property render

                        render?:
                        | ((props: RouteConfigComponentProps<any>) => React.ReactNode)
                        | undefined;

                          property routes

                          routes?: RouteConfig[] | undefined;

                            property strict

                            strict?: boolean | undefined;

                              index signature

                              [propName: string]: any;

                                interface RouteConfigComponentProps

                                interface RouteConfigComponentProps<
                                Params extends { [K in keyof Params]?: string } = {}
                                > extends RouteComponentProps<Params> {}

                                  property route

                                  route?: RouteConfig | undefined;

                                    Package Files (1)

                                    Dependencies (3)

                                    Dev Dependencies (0)

                                    No dev dependencies.

                                    Peer Dependencies (0)

                                    No peer dependencies.

                                    Badge

                                    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/@types/react-router-config.

                                    • Markdown
                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-router-config)
                                    • HTML
                                      <a href="https://www.jsdocs.io/package/@types/react-router-config"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>