When I try to add .concat(authMiddleware) below but “middleware” is underscore redline:
export const store = configureStore({
reducer: {
persistedReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: {
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
},
}).concat(authMiddleware),
});
The expected type comes from property ‘middleware’ which is declared here on type ‘ConfigureStoreOptions<{ persistedReducer: PersistPartial; }, UnknownAction, Tuple<Middlewares<{ persistedReducer: PersistPartial; }>>, Tuple<…>, { …; }>’
How do I fix it or use another idea to add middleware?
Cường Trần Văn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.