React Native错误:in next release empty section headers ...

升级React Native到最新版本出现了一个Warninghtml

Warning:In next release empty section headers will be rendered.
In this release you can use 'enableEmptySections' flag to render empty section headers

这个错误出如今ListView中,在之后的版本中才会实现空的section headers做为默认值,当前版本并无支持。
若是咱们不须要使用headers的话,能够禁止EmptySections
解决方法:react

 <ListView
      style={styles.listView}
      dataSource={this.state.dataSource}
      enableEmptySections={true}
      />

参考文档:
http://facebook.github.io/react-native/docs/listview.html#enableemptysectionsgit

相关文章
相关标签/搜索