问题标签 [redux-immutable]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
reactjs - 如何获取 rootReducer 的类型?
我有一个带有React
, Redux
, Immutable.js
+的配置项目TypeScript
。在实现过程中,我试图尽可能多地声明类型并发现了有趣的问题。请参见下面的代码示例:
redux store 的简短配置
组件内部某处
在 VS Code 中状态悬停时,工具提示显示状态是一个普通对象,但它不是。它应该是来自的自定义集合Immutable.js
我怎样才能得到正确的类型rootReducer
?或者我做错了什么?
截图:
PSStateType
并ReturnType
做同样的事情
javascript - How to use combineReducers with handleActions
I'm trying to create new reducer survey
, which must combine name
and questions
reducers while using handleActions
from redux-actions
package. But I recieve an error Invariant Violation: Expected handlers to be a plain object.
How should I change it to actually work?