Commit c4436359 authored by João Carmona's avatar João Carmona Committed by Tim Neutkens

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

parent 15e9573d
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"next": "latest", "next": "latest",
"next-redux-wrapper": "^1.0.0", "next-redux-wrapper": "^1.0.0",
"react": "^15.4.2", "react": "^15.4.2",
"redux-devtools-extension": "^2.13.2",
"react-dom": "^15.4.2", "react-dom": "^15.4.2",
"react-redux": "^5.0.1", "react-redux": "^5.0.1",
"redux": "^3.6.0", "redux": "^3.6.0",
......
import { createStore, applyMiddleware } from 'redux' import { createStore, applyMiddleware } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunkMiddleware from 'redux-thunk' import thunkMiddleware from 'redux-thunk'
const exampleInitialState = { const exampleInitialState = {
...@@ -39,5 +40,5 @@ export const addCount = () => dispatch => { ...@@ -39,5 +40,5 @@ export const addCount = () => dispatch => {
} }
export const initStore = (initialState = exampleInitialState) => { export const initStore = (initialState = exampleInitialState) => {
return createStore(reducer, initialState, applyMiddleware(thunkMiddleware)) return createStore(reducer, initialState, composeWithDevTools(applyMiddleware(thunkMiddleware)))
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment