Reactjs Redux persist TypeError:超级表达式必须为null或函数(16.13.1)
为什么redux持续抛出类型错误:超级表达式必须为null或函数,我遵循文档,我使用的是函数组件。有什么解决办法吗 Storeconfig.tsReactjs Redux persist TypeError:超级表达式必须为null或函数(16.13.1),reactjs,redux,react-redux,redux-persist,Reactjs,Redux,React Redux,Redux Persist,为什么redux持续抛出类型错误:超级表达式必须为null或函数,我遵循文档,我使用的是函数组件。有什么解决办法吗 Storeconfig.ts const persistConfig = { key: 'root', storage, whitelist: ['authentication'] } const rootReducer: any = combineReducers({ authentication: Auth, profile: Profi
const persistConfig = {
key: 'root',
storage,
whitelist: ['authentication']
}
const rootReducer: any = combineReducers({
authentication: Auth,
profile: Profile,
events: Events,
loadUser: LoadUser
})
const persistedReducer = persistReducer(persistConfig, rootReducer);
const initState = {};
export const store: any = createStore(
persistedReducer,
initState,
composeWithDevTools(applyMiddleware(thunk))
);
export const persistedStore = persistStore(store)
ReactDOM.render(
<React.StrictMode>
<Provider store={store}>
<PersistGate loading={null} persistor={persistedStore}>
<Router>
<App />
</Router>
</PersistGate>
</Provider>
</React.StrictMode>,
document.getElementById("root")
);
Index.ts
const persistConfig = {
key: 'root',
storage,
whitelist: ['authentication']
}
const rootReducer: any = combineReducers({
authentication: Auth,
profile: Profile,
events: Events,
loadUser: LoadUser
})
const persistedReducer = persistReducer(persistConfig, rootReducer);
const initState = {};
export const store: any = createStore(
persistedReducer,
initState,
composeWithDevTools(applyMiddleware(thunk))
);
export const persistedStore = persistStore(store)
ReactDOM.render(
<React.StrictMode>
<Provider store={store}>
<PersistGate loading={null} persistor={persistedStore}>
<Router>
<App />
</Router>
</PersistGate>
</Provider>
</React.StrictMode>,
document.getElementById("root")
);