【发布时间】:2018-08-19 21:08:52
【问题描述】:
我有一个小的 React-Redux 演示应用程序,当我开始在文本框中输入一个值时,它会引发以下错误。该错误仅在我第一次开始输入时发生,之后不再发生。
第一页加载时的屏幕视图:
Here 重现此错误的存储库。 该 repo 仅包含一个组件,因此很容易找到。 代码我这里就不贴了,因为太贴了。
我在我的应用程序中使用 React-Redux (actions/reducers/store)。
我看了很多关于这个错误的帖子,都说输入控件/文本框的初始值可能不是null或者undefined,这里不是这样。
初始存储状态设置为:
const combinedReducers = combineReducers({
CountReducer
});
const initialStoreState = {
CountReducer: {count: 123, wish_value: 12}
};
let store = createStore(combinedReducers, initialStoreState);
export default store;
【问题讨论】:
标签: reactjs redux react-redux