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

 

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

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

 


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

 

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

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

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

 


 

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

 

Component

相关文章:

  • 2022-12-23
  • 2023-01-31
  • 2021-04-12
  • 2022-01-11
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-06
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2020-10-12
  • 2022-12-23
  • 2023-01-02
相关资源
相似解决方案