react-native-ridge-list
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

react-native-ridge-list

FlatList abstraction which uses bvaughn/react-window on the web to create better list performance

Supported props

  • ListHeaderComponent (you have to provide height in the ListHeaderComponentStyle, it understands height + marginTop, marginBottom etc.
  • ListHeaderComponentStyle
  • numColumns
  • maxToRenderPerBatch
  • data
  • renderItem
  • getItemLayout
  • onEndReached
  • inverted
  • testID

Caveats

Installation

yarn add react-native-ridge-list

or

npm install react-native-ridge-list

Usage

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}
      />

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i react-native-ridge-list

Weekly Downloads

3

Version

0.3.0

License

MIT

Unpacked Size

56.8 kB

Total Files

15

Last publish

Collaborators

  • web-ridge