A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row. The truly ultimate version that I have done the most tricky part for you, just simply follow the instructions shown below to put it in your app.
This is an enhanced FlatList with all excellent extra features, comparing to the official version.
This module supports both of iOS and Android platforms.
All codes are written in ES6 syntax.
Quick installation
- If on react-native < 0.43:
yarn add [email protected]
- If on react-native >= 0.43
yarn add [email protected]
Know Issue (v3.2.0): On Android, if you are using CustomRefreshView, and the total hight of your first load data is less than your device height, then the RefreshView may still sticky on the top. However, if the data you loaded is beyond your screen, everything's fine. This issue only happen on Android, any PR is welcome.
iOS | Android | |
---|---|---|
FlatList | ![]() |
![]() |
I have found some articles to explain why you need to use FlatList, instead of the legacy ListView. There are some obvious reasons:
- FlatList just like the UICollectionView or RecyclerView, which can dramatically reduce memory usage. It also provides more soomth animation when you have an extremely long list.
- FlatList supports scrollToIndex function, which is pretty convenient when you want to scroll to an item with index, instead of depending the y-offset.
- FlatList recommend developer to use PureComponent to reduce unnecessary re-rendering, this can really boost the performance and make your app run faster.
- Overview
- FlatList Migration
- Usage
- ListView API
- RefreshView API
- Pagination API
- Methods API
- Swipable Tip
- See the Release Note
@gameboyVito - [email protected]
- Fork this Repository
- After modifying the code, commit and push to the forked repository
- Open your Github, create a pull request to me. I will review it ASAP, thanks a lot.
MIT