# @types/react-router-redux

> TypeScript definitions for react-router-redux

Latest version **5.0.27** (published 2024-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-router-redux
pnpm add @types/react-router-redux
yarn add @types/react-router-redux
bun add @types/react-router-redux
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.27 |
| Published | 2024-01-02 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-router-redux
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-redux
- npm.io page: https://npm.io/package/@types/react-router-redux

## Dependencies (4)

- [redux](https://npm.io/package/redux.md) >= 3.7.2
- [@types/react](https://npm.io/package/@types/react.md) *
- [@types/history](https://npm.io/package/@types/history.md) ^4.7.11
- [@types/react-router](https://npm.io/package/@types/react-router.md) ^5.1.0

## Recent versions

- 5.0.27 (latest) — 2024-01-02
- 5.0.25 (ts4.5) — 2023-11-07
- 5.0.22 (ts4.3) — 2023-04-05
- 5.0.21 (ts4.2) — 2022-01-18
- 5.0.20 (ts3.7) — 2021-10-07
- 5.0.19 (ts3.6) — 2021-07-07
- 5.0.18 (ts3.5) — 2019-02-13
- 5.0.16 (ts2.9) — 2018-09-13
- 5.0.13 (ts2.6) — 2018-03-28
- 5.0.11 (ts2.4) — 2017-12-23
- 5.0.9 (ts2.3) — 2017-10-25
- 5.0.2 (ts2.2) — 2017-06-02
- 4.0.44 (ts2.1) — 2017-03-28
- 4.0.38 (ts2.0) — 2017-01-13
- 5.0.26 — 2023-12-29
- … 71 more at https://npm.io/package/@types/react-router-redux/versions

## README

# Installation
> `npm install --save @types/react-router-redux`

# Summary
This package contains type definitions for react-router-redux (https://github.com/reactjs/react-router-redux).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-redux.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-redux/index.d.ts)
````ts
import { History, Location, LocationDescriptor, LocationState, Path } from "history";
import * as React from "react";
import { match } from "react-router";
import { Action, Dispatch, Middleware, Reducer, Store } from "redux";

export interface ConnectedRouterProps<State> {
    children?: React.ReactNode;
    store?: Store<State> | undefined;
    history: History;
}
export class ConnectedRouter<State> extends React.Component<ConnectedRouterProps<State>> {}

export const LOCATION_CHANGE = "@@router/LOCATION_CHANGE";

export interface RouterState {
    location: Location | null;
}

export const routerReducer: Reducer<RouterState, Action>;

export const CALL_HISTORY_METHOD = "@@router/CALL_HISTORY_METHOD";

export function push(location: LocationDescriptor, state?: LocationState): RouterAction;
export function replace(location: LocationDescriptor, state?: LocationState): RouterAction;
export function go(n: number): RouterAction;
export function goBack(): RouterAction;
export function goForward(): RouterAction;

export const routerActions: {
    push: typeof push;
    replace: typeof replace;
    go: typeof go;
    goBack: typeof goBack;
    goForward: typeof goForward;
};

export interface LocationActionPayload {
    method: string;
    args?: any[] | undefined;
}

export interface RouterAction {
    type: typeof CALL_HISTORY_METHOD;
    payload: LocationActionPayload;
}

export interface LocationChangeAction {
    type: typeof LOCATION_CHANGE;
    payload: Location & {
        props?: {
            match: {
                path: string;
                url: string;
                params: any;
                isExact: boolean;
            };
            location: Location;
            history: History;
        } | undefined;
    };
}

export function routerMiddleware(history: History): Middleware;

export function createMatchSelector(path: string): (state: { router: RouterState }) => match | null;

````

### Additional Details
 * Last updated: Tue, 02 Jan 2024 21:06:49 GMT
 * Dependencies: [@types/history](https://npmjs.com/package/@types/history), [@types/react](https://npmjs.com/package/@types/react), [@types/react-router](https://npmjs.com/package/@types/react-router), [redux](https://npmjs.com/package/redux)

# Credits
These definitions were written by [Huy Nguyen](https://github.com/huy-nguyen), [Shoya Tanaka](https://github.com/8398a7), and [Mykolas](https://github.com/mykolas).

---
_Source: https://npm.io/package/@types/react-router-redux · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
