reactjs - 为什么 redux 的 combine reducer 在使用 typescript 和 react-redux-firebase 时会抱怨方法重载?
问题描述
问题
我有一个只有最小样板的基本项目,因为我想尝试react-redux-firebase
. 所以我根据这里的打字稿示例设置了所有内容:https ://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/typescript
但是这部分:
const rootReducer = combineReducers<RootState>({
firebase: firebaseReducer,
firestore: firestoreReducer
});
正在抱怨:
> firestore: Reducer<FirestoreReducer.Reducer, any> No overload matches
> this call. Overload 1 of 3,
我做了一个最小的代码框演示来重现这个问题:
https://codesandbox.io/s/great-perlman-p6g7p?file=/src/store/index.ts
54
尽管应用程序运行良好,但您可以在线看到错误。在我的本地客户端上它不会呈现,我只是在浏览器中看到错误(重载......)。
我在这里做错了什么?它必须是关于打字稿的,当谈到打字稿时,我是一个真正的初学者。
解决方案
推荐阅读
- kubernetes - 这是否可以安排 CronJob 在每个 Kubernetes 节点上执行?
- sql - CASE WHEN THEN 如何处理 NULL 值
- checkbox - 无法获取要在复选框上显示的列特定时间戳
- leaflet - Leaflet + Turf 奇怪的 squareGrid 行为
- ruby - 有没有办法使用 Ruby 在 Centos 中使用 headless chromedriver 下载文件?
- python - 为什么 plt.scatter 会导致经常性错误
- xcode - 自动布局中的iOS垂直中心动态高度堆栈布局
- javascript - 如何使用 Twilio Whatsapp API 保存状态
- flutter - 在 Flutter 中的 Firestore 列表上方添加搜索表单
- java - 我应该修改什么以便浏览器让我可以选择保存返回的文件?