在 ImmutableJS 上苦苦挣扎...出现错误:
TypeError: this.props.dataTable.get(...).toJS is not a function
与此行相关:
let tbodyRows = this.props.dataTable.get('data').toJS();
当我执行 console.log this.props.dataTable.get('data')
我得到 Array[1] 并且该数组包含单个数据对象(这是我所期望的)。
最佳答案
为了使用.toJS()
,this.props.dataTable.get('data')
应该返回一个List
(在本例中)不是数组
。
关于react-redux - Immutable.js - TypeError : get(. ..).toJS 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43106212/