React-Native another VirtualizedList-backed container

后端 未结 15 825
名媛妹妹
名媛妹妹 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:21

    This error disappeared because of using FlatList inside ScrollView. You can write like the following code.

    
                
                  
                    
    {(list.length == 0) && No peripherals } this.renderItem(item) } keyExtractor={item => item.id} />

提交回复
热议问题