Skip to content

Commit a147c63

Browse files
committed
Merge pull request mjrussell#15 from gaearon/patch-1
Use new Redux API for applying enhancers
2 parents fc4f104 + dac6e94 commit a147c63

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ const reducer = combineReducers({
4444
const history = createHistory()
4545
const routingMiddleware = syncHistory(history)
4646

47-
const finalCreateStore = compose(
47+
// Note: passing middleware as the last argument requires redux@>=3.1.0
48+
const store = createStore(
49+
reducer,
4850
applyMiddleware(routingMiddleware)
49-
)(createStore);
50-
const store = finalCreateStore(reducer)
51+
)
5152
routingMiddleware.listenForReplays(store)
5253

5354
// Redirects to /login by default

0 commit comments

Comments
 (0)