我无法在当前项目中设置redux-observable。到目前为止,我一直在使用redux-toolkit来处理所有与redux相关的事情,但是现在当我尝试添加redux-observable时,我得到了这个错误:

我是这样设置的:
function logEpic(actions) {
return actions.pipe(tap(console.log), ignoreElements())
}
const epicMiddleware = createEpicMiddleware()
export const store = configureStore({
reducer: {
data: dataReducer,
dashboard: dashboardReducer,
error: errorReducer,
login: loginReducer,
authentication: authenticationReducer,
},
middleware: getDefaultMiddleware =>
getDefaultMiddleware().concat(epicMiddleware),
})
epicMiddleware.run(logEpic)下面是callstack:

发布于 2021-05-12 22:50:53
出现此问题的原因是与RxJS7不兼容。降级到6.6.7,现在看起来运行得很好。
https://stackoverflow.com/questions/67504292
复制相似问题