I keep getting this error and im not sure what im doing wrong - It looks pretty much exact to the docs except it doesnt work.
import {createStore , combineReducers, applyMiddleware} from 'redux'
import counterReducer from './ducks/counter'
const reducer = combineReducers({
counter: counterReducer
})
let preloadedState
const preloadedString = localStorage.getItem("prev")
if(preloadedString){
preloadedState = JSON.parse(preloadedString)
}
function thisIsSomeMiddleware(){
console.log('hey yo');
}
const middleware = applyMiddleware(thisIsSomeMiddleware);
const store = createStore(reducer, preloadedState , middleware)
export default store
Can anyone see whats going wrong here?