1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

feat(with-redux): add redux tools to example (#1994)

This commit is contained in:
João Carmona 2017-05-25 18:37:10 +02:00 committed by Tim Neutkens
parent 15e9573ded
commit c443635945
2 changed files with 3 additions and 1 deletions

View file

@ -10,6 +10,7 @@
"next": "latest",
"next-redux-wrapper": "^1.0.0",
"react": "^15.4.2",
"redux-devtools-extension": "^2.13.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.1",
"redux": "^3.6.0",

View file

@ -1,4 +1,5 @@
import { createStore, applyMiddleware } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunkMiddleware from 'redux-thunk'
const exampleInitialState = {
@ -39,5 +40,5 @@ export const addCount = () => dispatch => {
}
export const initStore = (initialState = exampleInitialState) => {
return createStore(reducer, initialState, applyMiddleware(thunkMiddleware))
return createStore(reducer, initialState, composeWithDevTools(applyMiddleware(thunkMiddleware)))
}