fixed-lazy-list
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Fixed Lazy List

Simple wrapper around react-window-infinite-loader and react-window's FixedSizeList

Usage

async function load(idx: number) {
  await delay(1)
  return `Fake item ${idx}`
}

return (
  <LazyList numItems={42} load={load}
    fixedProps={{ height: 512, itemSize: 64, width: '100%' }}
    Item={({ style, index, item }) => (
      <div style={style}>
        <p>{item}</p>
      </div>
    )}
  />
)

Readme

Keywords

none

Package Sidebar

Install

npm i fixed-lazy-list

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

5.37 kB

Total Files

7

Last publish

Collaborators

  • moveread