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:
parent
15e9573ded
commit
c443635945
|
@ -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",
|
||||
|
|
|
@ -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)))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue