Make virtualization more apparent in storybook

This commit is contained in:
Eric Bailey
2025-09-24 11:11:03 -05:00
parent 391a1d4be3
commit 94d9357b69
+3 -1
View File
@@ -39,7 +39,7 @@ export function Inner() {
runOnJS(log)(`scroll ${e.contentOffset.y}`)
}, [])
const items: Item[] = Array.from({length: 100}).map((_, i) => ({
const items: Item[] = Array.from({length: 1000}).map((_, i) => ({
key: `item-${i + 1}`,
type: 'item' as const,
title: `Item ${i + 1}`,
@@ -59,6 +59,8 @@ export function Inner() {
return (
<ListScrollProvider onScroll={onScrollWorklet}>
<Layout.List<Item>
windowSize={9}
maxToRenderPerBatch={5}
data={items}
stickyHeaderIndices={[1]}
renderItem={({item, index}) => {