const TestComponent = () => {
const items = [1, 2, 3, 4, 5]
return (
<React.Fragment>
<VirtualList items={items} itemHeight={0} itemBuffer={0}>
{({ virtual, itemHeight }, scrollableRef, ref) => (
<div style={{ overflowY: 'auto' }} ref={scrollableRef}>
<div ref={ref} style={virtual.style}>
{virtual.items.map((item) => (
<div style={{ height: itemHeight }}>{item}</div>
))}
</div>
</div>
)}
</VirtualList>
</React.Fragment>
)
}
forked from developerdizzle/react-virtual-list
-
Notifications
You must be signed in to change notification settings - Fork 0
Super simple virtualized list React component
License
nikifilini/react-virtual-list
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Super simple virtualized list React component
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- JavaScript 72.5%
- TypeScript 27.5%