美文网首页
react-native之sectionList 中state更

react-native之sectionList 中state更

作者: 知命者夏洛特 | 来源:发表于2019-01-15 21:46 被阅读0次

问题一:react-native之SectionList 中state更新,render不重新渲染问题

解决方法:在SectionList 里面加上extraData={this.state}就可以了


问题二:SectionList 中 renderSectionHeader 里面绑定函数不能传参问题

解决方法:在constructor里面加上下面这句话,完美解决this

this.renderSectionHeader = this.renderSectionHeader.bind(this);



问题三:SectionList 中 样式不能使用  flexWrap: 'wrap'

还没有找到解决方法,有知道的同学麻烦回复一下,感激不尽

只作为本人笔记,有问题的同学欢迎下方留言。。。,共同商讨进步


相关文章

网友评论

      本文标题:react-native之sectionList 中state更

      本文链接:https://www.haomeiwen.com/subject/bcyudqtx.html