Skip to content

Commit 1ea90e9

Browse files
committed
docs: updated docs to use 2 spaces for indentation
1 parent bd59d07 commit 1ea90e9

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Create a store with `initialState` set to an instance of [`Immutable.Iterable`](
2525

2626
```js
2727
import {
28-
combineReducers
28+
combineReducers
2929
} from 'redux-immutable';
3030

3131
import {
32-
createStore
32+
createStore
3333
} from 'redux';
3434

3535
const initialState = Immutable.Map();
@@ -44,38 +44,38 @@ const store = createStore(rootReducer, initialState);
4444
```js
4545
import Immutable from 'immutable';
4646
import {
47-
LOCATION_CHANGE
47+
LOCATION_CHANGE
4848
} from 'react-router-redux';
4949

5050
const initialState = Immutable.fromJS({
51-
locationBeforeTransitions: null
51+
locationBeforeTransitions: null
5252
});
5353

5454
export default (state = initialState, action) => {
55-
if (action.type === LOCATION_CHANGE) {
56-
return state.merge({
57-
locationBeforeTransitions: action.payload
58-
});
59-
}
55+
if (action.type === LOCATION_CHANGE) {
56+
return state.merge({
57+
locationBeforeTransitions: action.payload
58+
});
59+
}
6060

61-
return state;
61+
return state;
6262
};
6363
```
6464

6565
Pass a selector to access the payload state and convert it to a JavaScript object via the [`selectLocationState` option on `syncHistoryWithStore`](https://github.com/reactjs/react-router-redux/tree/v4.0.2#history--synchistorywithstorehistory-store-options):
6666

6767
```js
6868
import {
69-
browserHistory
69+
browserHistory
7070
} from 'react-router';
7171
import {
72-
syncHistoryWithStore
72+
syncHistoryWithStore
7373
} from 'react-router-redux';
7474

7575
const history = syncHistoryWithStore(browserHistory, store, {
76-
selectLocationState (state) {
77-
return state.get('routing').toJS();
78-
}
76+
selectLocationState (state) {
77+
return state.get('routing').toJS();
78+
}
7979
});
8080
```
8181

0 commit comments

Comments
 (0)