Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Latest commit

 

History

History
39 lines (33 loc) · 978 Bytes

File metadata and controls

39 lines (33 loc) · 978 Bytes

HyperListReact

Simple React wrapper for tbranyen/hyperlist, see examples folder for complete html and css example

Deprecated

⚠️ Warning, this library is not longer maintained, see thcolin/react-virtualist for alternative

Installation

🚨 hyperlist is a peer dependency

npm i -S hyperlist hyperlist-react

Usage

class MyVirtualList extends React.Component {
  render() {
    <HyperListReact
      height={window.innerHeight}
      itemHeight={30}
      total={100000}
      reverse={false}
      generate={this.generate}
    />
  }

  generate(row) {
    return (
      <div>{ 'Item ' + row }</div>
    )
  }
}

Tests

Just run npm test :

  • Currently testing only constructor

TODO