skip to Main Content

Reactjs – Type 'Middleware<{}, any, Dispatch<UnknownAction>>' is not assignable to type 'Middleware<{}, any, Dispatch<AnyAction>>' when define the redux logger

I define the redux logger "redux-logger": "^3.0.6" in react store.ts like this: import { configureStore } from '@reduxjs/toolkit'; import rootReducer from '@/redux/reducer/combineReducer'; import { createLogger } from 'redux-logger'; import thunk from 'redux-thunk'; import * as Redux from "redux"; import {…

VIEW QUESTION

Reactjs – Getting issue in middleware of configureStore when update redux-toolkit to 2.0.1

export const store: AppStore = configureStore({ reducer: rootReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false, immutableCheck: false }).concat([ createStateSyncMiddleware({ channel: "ketchcloth", broadcastChannelOption: { type: "localstorage", webWorkerSupport: false }, blacklist: ['persist/PERSIST', 'persist/PURGE', 'persist/REHYDRATE'] }) ]) }) Here, I got the error TS2322:…

VIEW QUESTION

React native – How can I use persistStore with Redux-Toolkit?

I have the following: import AsyncStorage from '@react-native-async-storage/async-storage' import { persistStore, persistReducer } from 'redux-persist'; import { configureStore } from "@reduxjs/toolkit"; import { searchReducer } from "./search/searchSlice" import { userReducer } from "./user/userSlice" export const store = configureStore({ reducer: {…

VIEW QUESTION
Back To Top
Search