React Native 0.23.1 warning: 'In next release empty section headers will be rendered'
See original GitHub issueSince upgrading I’m now getting this error.
My setup looks like this:
<GiftedListView style={{flex:1}}
automaticallyAdjustContentInsets={false}
rowView={this._renderRow}
onFetch={this._loadDataFromNetwork}
firstLoader={true}
pagination={false}
refreshable={true}
withSections={false}
customStyles={{refreshableView:{backgroundColor: '#FFFFFF'}}}
emptyView={this._renderEmptyView}
ref="listView"
/>
e.g. I’m using withSections={false}. Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
Warning: Empty section headers will be rendered - React Native
Well the warning already say it all. Just add enableEmptySections to your listview component and the warning is gone.
Read more >react-native-router-flux/CHANGELOG.md - UNPKG
17, - after update to Release 4.0.2 props not working. ... 33, - Require cycle warnings with React Native 0.57.0 ... 672, -...
Read more >react-native-router-flux | Yarn - Package Manager
react -native-router-flux is a different API over react-navigation . It helps users to define all the routes in one central place and navigate...
Read more >Changelog Legend - Saagie Design System
remove warnings for some state updates during Tabs render ... Add release date to changelog ... Update Thumbnail react component to allow children...
Read more >Changelog | Meteor API Docs
server-render@0.4.1 ... MongoDB Node.js driver Upgrade from 3.6.10 to 4.3.1 ... prefered) until the next minor version, where we will start showing alerts....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The full error message is:
Warning: In next release empty section headers will be rendered. In this release you can use 'enableEmptySections' flag to render empty section headers.
This flag is referenced in the documentation of the ListView. I’m not sure how @FaridSafi would like to solve the issue, but currently it is possible to mute the error passing it the flag, knowing that at some point the flag will be deprecated. Anyways @benvium, as a temporary fix insert the following line while calling GiftedListView:
enableEmptySections={true}
.If empty sections are not desired to be rendered their indices should be excluded from sectionID object.
AFAIK, this is just a confusing way of saying that in the future if you don’t want the headers for empty sections to show up, don’t include that sectionId in the data blob you passed to
cloneWithRowsAndSections
. If you usecloneWithRows
then you don’t have sections and so there’s no issue with section headers showing up. The confusing part is that even if you don’t use sections, it will still throw the warning mentioning sections. In this case, you can just setenableEmptySections={true}
and forget about it.https://github.com/facebook/react-native/blob/master/Libraries/CustomComponents/ListView/ListViewDataSource.js http://moduscreate.com/react-native-listview-with-section-headers/