diff --git a/README.md b/README.md index 7d4eefa..41145ee 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +# Project Deprecated + +This project is no longer maintained. For your Redux <-> Router syncing needs with React Router 4+, please see one of these libraries instead: + +* [connected-react-router](https://github.com/supasate/connected-react-router) + +--- + +⚠️ **This repo is for react-router-redux 4.x, which is only compatible with react-router 2.x and 3.x** + # react-router-redux [![npm version](https://img.shields.io/npm/v/react-router-redux.svg?style=flat-square)](https://www.npmjs.com/package/react-router-redux) [![npm downloads](https://img.shields.io/npm/dm/react-router-redux.svg?style=flat-square)](https://www.npmjs.com/package/react-router-redux) [![build status](https://img.shields.io/travis/reactjs/react-router-redux/master.svg?style=flat-square)](https://travis-ci.org/reactjs/react-router-redux) @@ -90,7 +100,7 @@ These two hooks will allow you to store the state that this library uses in what #### How do I access router state in a container component? -React Router [provides route information via a route component's props](https://github.com/ReactTraining/react-router/blob/master/docs/Introduction.md#getting-url-parameters). This makes it easy to access them from a container component. When using [react-redux](https://github.com/reactjs/react-redux) to `connect()` your components to state, you can access the router's props from the [2nd argument of `mapStateToProps`](https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options): +React Router [provides route information via a route component's props](https://github.com/ReactTraining/react-router/blob/v3/docs/Introduction.md#getting-url-parameters). This makes it easy to access them from a container component. When using [react-redux](https://github.com/reactjs/react-redux) to `connect()` your components to state, you can access the router's props from the [2nd argument of `mapStateToProps`](https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options): ```js function mapStateToProps(state, ownProps) { @@ -128,6 +138,7 @@ store.dispatch(push('/foo')) Examples from the community: +* [react-redux-styled-hot-universal](https://github.com/krasevych/react-redux-styled-hot-universal) (SSR, Universal Webpack, Redux, React-router, Webpack 2, Babel, Styled Components and more...) * [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial) - react-router-redux including **Server Rendering** using [React on Rails](https://github.com/shakacode/react_on_rails/), live at [www.reactrails.com](http://www.reactrails.com/). * [davezuko/react-redux-starter-kit](https://github.com/davezuko/react-redux-starter-kit) - popular redux starter kit * **tip**: migrating from react-router-redux `^3.0.0`? use [this commit](https://github.com/davezuko/react-redux-starter-kit/commit/0df26907) as a reference @@ -161,8 +172,7 @@ The `options` object takes in the following optional keys: **You must install `routerMiddleware` for these action creators to work.** -Action creators that correspond with the [history methods of the same name] -(https://github.com/mjackson/history/blob/master/README.md#navigation). For reference they are defined as follows: +Action creators that correspond with the [history methods of the same name](https://github.com/ReactTraining/history/blob/v3/docs/GettingStarted.md#navigation). For reference they are defined as follows: - `push` - Pushes a new location to history, becoming the current location. - `replace` - Replaces the current location in history. @@ -170,7 +180,7 @@ Action creators that correspond with the [history methods of the same name] - `goForward` - Moves forward one location. Equivalent to `go(1)` - `goBack` - Moves backwards one location. Equivalent to `go(-1)` -Both `push` and `replace` take in a [location descriptor](https://github.com/ReactTraining/history/blob/v2/docs/Glossary.md#locationdescriptor), which can be an object describing the URL or a plain string URL. +Both `push` and `replace` take in a [location descriptor](https://github.com/ReactTraining/history/blob/v3/docs/Location.md), which can be an object describing the URL or a plain string URL. These action creators are also available in one single object as `routerActions`, which can be used as a convenience when using Redux's `bindActionCreators()`.