const initialState = {}; // remove this line cuz we don't need it const store = createStore(bookReducer, applyMiddleware(...middleware)); //fixed like this