react-报错
estherlxy
这个作者很懒,什么都没留下…
展开
-
删除list倒叙删除出现问题,顺序删除没有问题
原代码:<List bordered dataSource={this.props.list} renderItem={(item,index)=>( <List.Item onClick={(index)=>{this.props.deleteItem(index)}}> {item} </List.Item>)}/> 原因:主要是index出现了重新声明的问题。.原创 2020-06-02 12:38:04 · 309 阅读 · 0 评论 -
Cannot read property map of undefined
原代码:报错信息:TypeError: Cannot read property 'map' of undefinedListUi.rendersrc/Demo1/listUI.jsx:13 10 | {/* ref={input => this.input = input} */} 11 | <input value={this.props.inpValue} onChange={this.props.changeValue} /> 12 | <原创 2020-06-02 11:42:28 · 2648 阅读 · 0 评论