我正在尝试使用react-draft-wysiwyg和redux。我的代码如下:
<Editor
editorState={this.props.editorsState[el.i]}
onEditorStateChange={e => this.props.onSaveColumnEditorState(e, el.i) }
/>
还原剂:
case editorTypes.UPDATE_COLUMN_EDITOR_STATE:
return {
...state,
editorsState: Object.assign({}, state.editorsState, {[action.payload.columnUUID]: action.payload.editorState}),
};
Redux状态已成功更新(已检查redux工具),但每次按键时我都会收到恼人的警告:
不推荐使用iterable.length,使用iterable.size或 iterable.count()。此警告将在未来成为无声错误 版。错误 在Map.get(webpack-internal:///../node_modules/draft-js/node_modules/immutable/dist/immutable.js:4650:21) at baseIsTypedArray(webpack-internal:///../node_modules/lodash-es/_baseIsTypedArray.js:60:81) 在arrayLikeKeys(webpack-internal:///../node_modules/lodash-es/_arrayLikeKeys.js:32:120) 在键(webpack-internal:///../node_modules/lodash-es/keys.js:37:167) at baseGetAllKeys(webpack-internal:///../node_modules/lodash-es/_baseGetAllKeys.js:18:16) at getAllKeys(webpack-internal:///../node_modules/lodash-es/_getAllKeys.js:16:85) at equalObjects(webpack-internal:///../node_modules/lodash-es/_equalObjects.js:30:89) at baseIsEqualDeep(webpack-internal:///../node_modules/lodash-es/_baseIsEqualDeep.js:88:83) at baseIsEqual(webpack-internal:///../node_modules/lodash-es/_baseIsEqual.js:27:86) at equalObjects(webpack-internal:///../node_modules/lodash-es/_equalObjects.js:65:39)
警告仅在我将状态从react组件移动到redux后才出现。什么可能导致警告&amp;如何删除它?