Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Commit 9483ea4

Browse files
authored
Small tweaks to the immutable section.
1 parent afd8c69 commit 9483ea4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ history.listen(location => analyticsService.track(location.pathname))
8181

8282
For other kinds of events in your system, you can use middleware on your Redux store like normal to watch any action that is dispatched to the store.
8383

84-
#### What if I use Immutable.js or another wrapper with my Redux store?
84+
#### What if I use Immutable.js or another state wrapper with my Redux store?
8585

8686
When using a wrapper for your store's state, such as Immutable.js, you will need to change two things from the standard setup:
8787

88-
1. By default, the library expects to find the router state at `state.routing`. If your wrapper prevents accessing properties directly, or you want to put the routing state elsewhere, pass a selector to access the payload state and convert it to a JS object via the `selectLocationState` option on `syncHistoryWithStore`.
89-
2. Provide your own reducer function that will receive actions of type `LOCATION_CHANGE` and return the payload merged into the `locationBeforeTransitions` property of the routing state. For example, `state.set("routing", {locationBeforeTransitions: action.payload})`.
88+
1. By default, the library expects to find the history state at `state.routing`. If your wrapper prevents accessing properties directly, or you want to put the routing state elsewhere, pass a selector function to access the historystate via the `selectLocationState` option on `syncHistoryWithStore`.
89+
2. Provide your own reducer function that will receive actions of type `LOCATION_CHANGE` and return the payload merged into the `locationBeforeTransitions` property of the routing state. For example, `state.set("routing", {locationBeforeTransitions: action.payload})`.
9090

9191
These two hooks will allow you to store the state that this library uses in whatever format or wrapper you would like.
9292

0 commit comments

Comments
 (0)