patternjavascriptreactCritical
React Native: another VirtualizedList-backed container
Viewed 0 times
virtualizedlistbackedanothernativereactcontainer
Problem
After upgrading to React Native 0.61, I get a lot of warnings like this:
What is the other
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.What is the other
VirtualizedList-backed container that I should use, and why is it now advised not to use it like that?Solution
If someone's still looking for a suggestion to the problem that Ponleu and David Schilling have described here (regarding content that goes above the FlatList), then this is the approach I took:
You can read more about this in ListHeaderComponent.
You can read more about this in ListHeaderComponent.
Code Snippets
<SafeAreaView style={{flex: 1}}>
<FlatList
data={data}
ListHeaderComponent={ContentThatGoesAboveTheFlatList}
ListFooterComponent={ContentThatGoesBelowTheFlatList} />
</SafeAreaView>Context
Stack Overflow Q#58243680, score: 174
Revisions (0)
No revisions yet.