React-Native another VirtualizedList-backed container

后端 未结 15 832
名媛妹妹
名媛妹妹 2020-12-08 13:00

After upgrading to react-native 0.61 i get a lot of warnings like that:

VirtualizedLists should never be nested inside plain ScrollViews with the same orient         


        
15条回答
  •  没有蜡笔的小新
    2020-12-08 13:31

    The warning appears because ScrollView and FlatList share the same logic, if FlatList run inside ScrollView, it's duplicated

    By the way SafeAreaView doesn't work for me, the only way to solve is

    
        {data.map((item, index) => {
            ...your code
        }}
    
    

    The error disappears

提交回复
热议问题