@types/react-router-dom

  • Version 5.3.3
  • Published
  • 7.64 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-dom

Index

Functions

Link: <S = H.LocationState>(
...params: Parameters<Link<S>>
) => ReturnType<Link<S>>;
    NavLink: <S = H.LocationState>(
    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 children

              children?: React.ReactNode;

                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 children

                          children?: React.ReactNode;

                            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 Omit<LinkProps<S>, 'className' | 'style'> {}
                                                activeClassName?: string | undefined;
                                                  activeStyle?: React.CSSProperties | undefined;
                                                    className?: string | ((isActive: boolean) => string) | undefined;
                                                      exact?: boolean | undefined;
                                                        location?: H.Location<S> | undefined;
                                                          sensitive?: boolean | undefined;
                                                            strict?: boolean | undefined;
                                                              style?:
                                                              | React.CSSProperties
                                                              | ((isActive: boolean) => React.CSSProperties)
                                                              | undefined;
                                                                isActive: <Params extends { [K in keyof Params]?: string }>(
                                                                match: match<Params> | null,
                                                                location: H.Location<S>
                                                                ) => 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>