TypeError: Found non-callable @@iterator
const middelware ={thunk};
const Store = createStore(
rootReducer,initialState, compose(
applyMiddleware(...middelware),
window.devToolsExtension ? window.devToolsExtension() : f=> f
const middelware ={thunk};
const Store = createStore(
rootReducer,initialState, compose(
applyMiddleware(...middelware),
window.devToolsExtension ? window.devToolsExtension() : f=> f
Presumably middleware
is an object and not an array, so here or somewhere else, you are doing the equivalent of this:
applyMiddleware(...{})
rather than:
applyMiddleware(...[])
Spreading arguments in function calls can only be done with arrays or other similar iterable objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With