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

Commit 8780e56

Browse files
committed
Merge pull request #2 from ellbee/patch-1
Fix Typos
2 parents 73e4f64 + 57771c8 commit 8780e56

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ npm install redux-simple-router
2626

2727
[redux-router](https://github.com/rackt/redux-router) is another
2828
project which solves the same problem. However, it's far more complex.
29-
Just looks look at this code: the whole thing is only 68 lines of JS.
29+
Just look at this code: the whole thing is only 68 lines of JS.
3030
redux-router is much bigger and more complex.
3131

3232
That said, redux-router is a fine project and has features this
@@ -48,7 +48,7 @@ It should be very future-proof with any versions of either libraries.
4848

4949
## How to Use
5050

51-
The idea of this libray is to use react-router's functionality exactly
51+
The idea of this library is to use react-router's functionality exactly
5252
like its documentation tells you to. You can access all of its APIs in
5353
routing components. Additionally, you can use redux like you normally
5454
would, with a single app state and "connected" components. It's even
@@ -61,16 +61,17 @@ it, and also change it with an action.
6161
Here's some code:
6262

6363
```js
64-
const { createStore } = require('redux');
64+
const { createStore, combineReducers } = require('redux');
6565
const { Provider } = require('react-redux');
6666
const { Router, Route } = require('react-router');
6767
const createBrowserHistory = require('history/lib/createBrowserHistory');
6868
const { syncReduxAndRouter, routeReducer } = require('redux-simple-routing');
6969
const reducers = require('<project-path>/reducers');
7070

71-
const store = createStore(Object.assign({}, reducers, {
71+
const reducer = combineReducers(Object.assign({}, reducers, {
7272
routing: routeReducer
73-
});
73+
}));
74+
const store = createStore(reducer);
7475
const history = createBrowserHistory();
7576

7677
syncReduxAndRouter(history, store);
@@ -121,7 +122,7 @@ function update(state, action) {
121122
### `syncReduxAndRouter(history, store)`
122123

123124
Call this with a react-router and a redux store instance to install
124-
hooks that always keep both of them in sync. When one changes, so with
125+
hooks that always keep both of them in sync. When one changes, so will
125126
the other.
126127

127128
### `routeReducer`

0 commit comments

Comments
 (0)