configureStoreintermediateconst store = configureStore({
reducer: myReducer,
middleware: getDefaultMiddleware =>
getDefaultMiddleware().concat(loggingMiddleware),
})Extend the default middleware array with custom middleware using getDefaultMiddleware().concat().
configureStore accepts a middleware option. Pass a function getDefaultMiddleware => getDefaultMiddleware().concat(myMiddleware) to add custom middleware while keeping the defaults (thunk, serializability check, etc.).
Challenge: Add a logging middleware that records dispatched action types to a logged array.