Sorry for the silly question but i do not know how to combine together my existing redux store definition with applyMiddleware.
This is my current working code:
const store = createStore(
combineReducers({
...reducers,
routing: routerReducer
})
)
I would like to add this middleware somehow to my store definition:
applyMiddleware(...thunk)
My solution does not work, I get a "TypeError: dbg is undefined" in the web browser:
const store = createStore(
applyMiddleware(...thunk),
combineReducers({
...reducers,
routing: routerReducer
})
)
Could you please give me a quick help? Thank you.