I am getting a getDefaultMiddleware
is deprecated warning after updating "@reduxjs/toolkit": "^1.6.1"
So how should I remove this warning. Do we have any other way to inject default middleware in the configureStore
function?
import { configureStore, getDefaultMiddleware } from "@reduxjs/toolkit";
import reducer from "./reducer";
import api from "./middleware/api";
export default function storeConfigure() {
const store = configureStore({
reducer,
middleware: [
...getDefaultMiddleware(),
api
],
});
return store;
}
Any help is appreciated thanks!
concat
multiple custom middleware? when I am adding multiple custom middlewares app stopped working. – Sememe