You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2018. It is now read-only.
- Remove `history` module published within the tarball. [#133](https://github.com/rackt/react-router-redux/issues/133)
22
-
- Make actions conform to [Flux Standard Action](https://github.com/acdlite/flux-standard-action). [#208](https://github.com/rackt/react-router-redux/pull/208)
21
+
- Remove `history` module published within the tarball. [#133](https://github.com/reactjs/react-router-redux/issues/133)
22
+
- Make actions conform to [Flux Standard Action](https://github.com/acdlite/flux-standard-action). [#208](https://github.com/reactjs/react-router-redux/pull/208)
Versions 2.0.0 and 2.0.1 were test releases for the 2.* series. 2.0.2 is the first public release.
27
27
@@ -31,20 +31,20 @@ Versions 2.0.0 and 2.0.1 were test releases for the 2.* series. 2.0.2 is the fir
31
31
* If you use redux devtools, you need to call `middleware.listenForReplays(store)` on the middleware returned from `syncHistory`. Create the store first with the middleware, then call this function with the store.
32
32
* Action creators are now contained in a single object called `routeActions`. `go`, `goBack`, and `goForward` action creators have been added.
33
33
*`UPDATE_PATH` is now `UPDATE_LOCATION`.
34
-
* The fully parsed [location object](https://github.com/rackt/history/blob/master/docs/Location.md) is now stored in the state instead of a URL string. To access the path, use `state.routing.location.pathname` instead of `state.routing.path`.
34
+
* The fully parsed [location object](https://github.com/reactjs/history/blob/master/docs/Location.md) is now stored in the state instead of a URL string. To access the path, use `state.routing.location.pathname` instead of `state.routing.path`.
35
35
36
-
[View the new docs](https://github.com/rackt/react-router-redux#api)
36
+
[View the new docs](https://github.com/reactjs/react-router-redux#api)
[Redux](https://github.com/rackt/redux) is awesome. [React Router](https://github.com/rackt/react-router) is cool. The problem is that react-router manages an important piece of your application state: the URL. If you are using redux, you want your app state to fully represent your UI; if you snapshotted the app state, you should be able to load it up later and see the same thing.
9
+
[Redux](https://github.com/rackt/redux) is awesome. [React Router](https://github.com/reactjs/react-router) is cool. The problem is that react-router manages an important piece of your application state: the URL. If you are using redux, you want your app state to fully represent your UI; if you snapshotted the app state, you should be able to load it up later and see the same thing.
10
10
11
11
react-router does a great job of mapping the current URL to a component tree, and continually does so with any URL changes. This is very useful, but we really want to store this state in redux as well.
If you want to install the next major version, use `react-router-redux@next`. Run `npm dist-tag ls react-router-redux` to see what `next` is aliased to.
20
20
21
-
View the [CHANGELOG](https://github.com/rackt/react-router-redux/blob/master/CHANGELOG.md) for recent changes.
21
+
View the [CHANGELOG](https://github.com/reactjs/react-router-redux/blob/master/CHANGELOG.md) for recent changes.
22
22
23
23
Read the [API docs](#api) farther down this page.
24
24
25
-
**Note:** We are [currently working on some major changes/improvements](https://github.com/rackt/react-router-redux/issues/259) to the library. [React Router's API in 2.0](https://github.com/rackt/react-router/blob/master/upgrade-guides/v2.0.0.md) is significantly improved and obseletes the need for things like action creators and reading location state from the Redux. This library is still critical to enable things like time traveling and persisting state, so we're not going anywhere. But in many cases, you may not need this library and can simply use the provided React Router APIs. Go check them out and drop some technical debt. :smile:
25
+
**Note:** We are [currently working on some major changes/improvements](https://github.com/reactjs/react-router-redux/issues/259) to the library. [React Router's API in 2.0](https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md) is significantly improved and obseletes the need for things like action creators and reading location state from the Redux. This library is still critical to enable things like time traveling and persisting state, so we're not going anywhere. But in many cases, you may not need this library and can simply use the provided React Router APIs. Go check them out and drop some technical debt. :smile:
26
26
27
27
### Usage
28
28
29
29
The idea of this library is to use react-router's functionality exactly like its documentation tells you to. You can access all of its APIs in routing components. Additionally, you can use redux like you normally would, with a single app state.
We only store current URL and state, whereas redux-router stores the entire location object from react-router. You can read it, and also change it with an action.
34
34
@@ -97,7 +97,7 @@ function update(state, action) {
97
97
```
98
98
**But how do I access router props in a Container component?**
99
99
100
-
react-router [injects route information via a child component's props](https://github.com/rackt/react-router/blob/latest/docs/Introduction.md#getting-url-parameters). This makes accessing them from a simple component easy. When using a react-redux Container to connect simple components to the store state and dispatch you can access these injected route information from the [2nd argument of `mapStateToProps`](https://github.com/rackt/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) as follows:
100
+
react-router [injects route information via a child component's props](https://github.com/reactjs/react-router/blob/latest/docs/Introduction.md#getting-url-parameters). This makes accessing them from a simple component easy. When using a react-redux Container to connect simple components to the store state and dispatch you can access these injected route information from the [2nd argument of `mapStateToProps`](https://github.com/rackt/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) as follows:
101
101
102
102
```js
103
103
functionmapStateToProps(state, ownProps) {
@@ -111,7 +111,7 @@ function mapStateToProps(state, ownProps) {
@@ -166,4 +166,4 @@ An object that contains all the actions creators you can use to manipulate histo
166
166
*`goForward()`
167
167
*`goBack()`
168
168
169
-
A [location descriptor](https://github.com/rackt/history/blob/master/docs/Glossary.md#locationdescriptor) can be a descriptive object (see the link) or a normal URL string. The most common action is to push a new URL via `routeActions.push(...)`. These all directly call the analogous [history methods](https://github.com/rackt/history/blob/master/docs/GettingStarted.md#navigation).
169
+
A [location descriptor](https://github.com/reactjs/history/blob/master/docs/Glossary.md#locationdescriptor) can be a descriptive object (see the link) or a normal URL string. The most common action is to push a new URL via `routeActions.push(...)`. These all directly call the analogous [history methods](https://github.com/reactjs/history/blob/master/docs/GettingStarted.md#navigation).
0 commit comments