G
G
gentle_liar2019-12-29 12:21:27
React Native
gentle_liar, 2019-12-29 12:21:27

How to remove error when using FlatList in ScrollView?

I am a joon in react-native. When I use FlatList in ScrollView , I get an error:

VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.

In FlatList I display a list of friends, news, etc., there may be several of them. There are also many other components above and below the FlatList.
I tried to make SafeAreaView instead of ScrollView , in this case the scrolling of the entire screen disappears.
I use
  1. "react": "16.9.0"
  2. "react-native": "0.61.5"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimka Reactive, 2019-12-29
@raoffonom

ScrollView cannot be used with Flatlist.
Flatlist has the following parameters for your tasks:
ListHeaderComponent - for the header
ListFooterComponent - for the footer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question