FlatList abstraction which uses bvaughn/react-window on the web to create better list performance
- ListHeaderComponent (you have to provide height in the ListHeaderComponentStyle, it understands height + marginTop, marginBottom etc.
- ListHeaderComponentStyle
- numColumns
- maxToRenderPerBatch
- data
- renderItem
- getItemLayout
- onEndReached
- inverted
- testID
- you are required to provide the getItemLayout
- inverted FlatList always reverse scroll on Mac devices but don't understand other scroll behaviours in browsers other than Safari, because we can only detect this in Safari.
yarn add react-native-ridge-list
or
npm install react-native-ridge-list
import RidgeList from "react-native-ridge-list";
const ITEM_HEIGHT = 65
function getDefaultItemLayout(
data,
index,
) {
return {
length: ITEM_HEIGHT,
offset: ITEM_HEIGHT * index,
index,
};
}
// ...
<RidgeList
data={DATA}
renderItem={renderItem}
keyExtractor={item => item.id}
getItemLayout={getDefaultItemLayout}
/>
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT