• Version 5.1.7
  • Published
  • 6.75 kB
  • 3 dependencies
  • MIT license


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


TypeScript definitions for React Router



Link: <S = any>(...params: Parameters<Link<S>>) => ReturnType<Link<S>>;
    NavLink: <S = any>(
    props: React.PropsWithoutRef<NavLinkProps<S>> &
    ) => ReturnType<NavLink<S>>;


      class BrowserRouter

      class BrowserRouter extends React.Component<BrowserRouterProps, any> {}

        class HashRouter

        class HashRouter extends React.Component<HashRouterProps, any> {}


          interface BrowserRouterProps

          interface BrowserRouterProps {}

            property basename

            basename?: string;

              property forceRefresh

              forceRefresh?: boolean;

                property getUserConfirmation

                getUserConfirmation?: (message: string, callback: (ok: boolean) => void) => void;

                  property keyLength

                  keyLength?: number;

                    interface HashRouterProps

                    interface HashRouterProps {}

                      property basename

                      basename?: string;

                        property getUserConfirmation

                        getUserConfirmation?: (message: string, callback: (ok: boolean) => void) => void;

                          property hashType

                          hashType?: 'slash' | 'noslash' | 'hashbang';
                            interface Link<S = H.LocationState>
                            extends React.ForwardRefExoticComponent<
                            React.PropsWithoutRef<LinkProps<S>> & React.RefAttributes<HTMLAnchorElement>
                            > {}

                              interface LinkProps

                              interface LinkProps<S = H.LocationState>
                              extends React.AnchorHTMLAttributes<HTMLAnchorElement> {}

                                property component

                                component?: React.ComponentType<any>;

                                  property innerRef

                                  innerRef?: React.Ref<HTMLAnchorElement>;

                                    property replace

                                    replace?: boolean;

                                      property to

                                      | H.LocationDescriptor<S>
                                      | ((location: H.Location<S>) => H.LocationDescriptor<S>);
                                        interface NavLink<S = H.LocationState>
                                        extends React.ForwardRefExoticComponent<
                                        React.PropsWithoutRef<NavLinkProps<S>> &
                                        > {}
                                          interface NavLinkProps<S = H.LocationState> extends LinkProps<S> {}
                                            activeClassName?: string;
                                              activeStyle?: React.CSSProperties;
                                                exact?: boolean;
                                                  location?: H.Location<S>;
                                                    strict?: boolean;
                                                      isActive: <Params extends { [K in keyof Params]?: string }>(
                                                      match: match<Params> | null,
                                                      location: any
                                                      ) => boolean;

                                                        Package Files (1)

                                                        Dependencies (3)

                                                        Dev Dependencies (0)

                                                        No dev dependencies.

                                                        Peer Dependencies (0)

                                                        No peer dependencies.


                                                        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-dom.

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