0.2.2 • Published 12 months ago

@dims/virtualist v0.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Virtualist

By using useVirtualist hook, you can create a virtualized list that efficiently renders only the visible portion of the list based on the scroll position, improving performance when dealing with large lists of items.

  • Much simpler than popular solutions.
  • No pain when dealing with rows with varying heights.
  • Use the onScroll callback directly to initiate infinite loading.
  • Designed as a hook to provide maximum flexibility for customization.

Options

OptionDefault ValueDescription
recordsN/AAn array of DB records to be rendered in the virtualized list.
listHeight500The height of the list container in pixels.
itemHeight50The placeholder height of each item before it is rendered.
onScrollN/AA callback function triggered when the list is scrolled.
throttle50The delay in milliseconds to debounce the scroll event.
renderOffset400The additional offset in pixels to render items outside the visible area.

TODO

  • benchmarks
  • add tests
  • extend examples
0.2.1

12 months ago

0.2.0

12 months ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.2.2

12 months ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago