React Native 列表 - RecyclerView 和 UITableView

React Native Lists - RecyclerView & UITableView

我很好奇为什么 React Native 不使用原生平台列表组件,例如 Android 的 RecyclerView 和 iOS 的 UITableView (CollectionView)。

理想情况下,这可以提供比当前可用的更多的功能支持和改进的性能。

React Native 列表完全由 ScrollViews 支持是否有原因?

我不能亲自告诉你,只能引用作者的话。

UITableView API is not well suited for the asynchronous nature of ReactNative, and the resulting code was pretty gross, especially when trying to do smooth animations to grow the heights of rows, which we do in the groups app.

来源:Early discussion 就在这一点上。

对于 Android 中的回收站视图。试试这个。

react-native-recycler-listview

有效!不过需要一些 gradle 设置。