Invariant Violation: A VirtualizedList contains a cell which itself contains more than one VirtualizedList

Dan picture Dan · Feb 28, 2018 · Viewed 7.9k times · Source

The complete error is:

Invariant Violation: A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as the parent list. You must pass a unique listKey prop to each sibling list.

Every single one of my FlatList components has a keyExtractor prop. Every item within the List from react-native-elements component has a key prop.

Could anyone shed any light on the meaning of this problem?

Answer

Andrada L picture Andrada L · Mar 22, 2018

As the error says "You must pass a unique listKey prop to each sibling list." A prop like listKey="someUniqueString" to FlatList fixed this error for me