首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用redux-toolkit设置redux-observable?

如何使用redux-toolkit设置redux-observable?
EN

Stack Overflow用户
提问于 2021-05-12 21:06:35
回答 1查看 229关注 0票数 1

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

我是这样设置的:

代码语言:javascript
复制
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:

EN

回答 1

Stack Overflow用户

发布于 2021-05-12 22:50:53

出现此问题的原因是与RxJS7不兼容。降级到6.6.7,现在看起来运行得很好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67504292

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档