@types/react-router-dom

  • Version 5.1.8
  • Published
  • 7.04 kB
  • 3 dependencies
  • MIT license

Install

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

Overview

TypeScript definitions for React Router

Index

Functions

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

      Classes

      class BrowserRouter

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

        class HashRouter

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

          Interfaces

          interface BrowserRouterProps

          interface BrowserRouterProps {}

            property basename

            basename?: string | undefined;

              property forceRefresh

              forceRefresh?: boolean | undefined;

                property getUserConfirmation

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

                  property keyLength

                  keyLength?: number | undefined;

                    interface HashRouterProps

                    interface HashRouterProps {}

                      property basename

                      basename?: string | undefined;

                        property getUserConfirmation

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

                          property hashType

                          hashType?: 'slash' | 'noslash' | 'hashbang' | undefined;
                            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> | undefined;

                                  property innerRef

                                  innerRef?: React.Ref<HTMLAnchorElement> | undefined;

                                    property replace

                                    replace?: boolean | undefined;

                                      property to

                                      to:
                                      | H.LocationDescriptor<S>
                                      | ((location: H.Location<S>) => H.LocationDescriptor<S>);
                                        interface NavLink<S = H.LocationState>
                                        extends React.ForwardRefExoticComponent<
                                        React.PropsWithoutRef<NavLinkProps<S>> &
                                        React.RefAttributes<HTMLAnchorElement>
                                        > {}
                                          interface NavLinkProps<S = H.LocationState> extends LinkProps<S> {}
                                            activeClassName?: string | undefined;
                                              activeStyle?: React.CSSProperties | undefined;
                                                exact?: boolean | undefined;
                                                  location?: H.Location<S> | undefined;
                                                    strict?: boolean | undefined;
                                                      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.

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

                                                        • Markdown
                                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-router-dom)
                                                        • 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>