🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-ridge-list

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ridge-list

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

0.3.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

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

Keywords

react-native

FAQs

Package last updated on 01 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts