I was trying to setup redux in my existing React project using redux toolkit by following the official documentation.
I tried configuring the middleware
import { configureStore, MiddlewareArray } from '@reduxjs/toolkit'
configureStore({
reducer: rootReducer,
middleware: new MiddlewareArray().concat(logger),
})
configureStore({
reducer: rootReducer,
middleware: [logger] as const,
})
However, I get the below error.
I tried https://stackoverflow.com/a/68486869, it didn't help
Can anyone help here