An open API service indexing awesome lists of open source software.

https://github.com/timwis/hyperlist-component

Wraps HyperList with Nanocomponent to allow use as a pureish component.
https://github.com/timwis/hyperlist-component

Last synced: 24 days ago
JSON representation

Wraps HyperList with Nanocomponent to allow use as a pureish component.

Awesome Lists containing this project

README

        

# HyperList Component
Wraps [HyperList][1] with [Nanocomponent][2] to allow use as a pureish
component.

## Usage
```javascript
const html = require('bel')
const HyperList = require('hyperlist-component')

const opts = {
height: 500,
itemHeight: 30,
eachItem: (state, index) => html`

  • ${state.items[index]}
  • `,
    getTotal: (state) => state.items.length
    }
    const hyperList = new HyperList('ul', opts)

    const ul = hyperList.render({ items: [1, 2, 3] }) // can be called repeatedly
    ```

    [1]: https://github.com/tbranyen/hyperlist/
    [2]: https://github.com/yoshuawuyts/nanocomponent/