Skip to content

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

Notifications You must be signed in to change notification settings

timwis/hyperlist-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyperList Component

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

Usage

const html = require('bel')
const HyperList = require('hyperlist-component')

const opts = {
  height: 500,
  itemHeight: 30,
  eachItem: (state, index) => html`<li>${state.items[index]}</li>`,
  getTotal: (state) => state.items.length
}
const hyperList = new HyperList('ul', opts)

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published