Make virtualization more apparent in storybook
This commit is contained in:
@@ -39,7 +39,7 @@ export function Inner() {
|
|||||||
runOnJS(log)(`scroll ${e.contentOffset.y}`)
|
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}`,
|
key: `item-${i + 1}`,
|
||||||
type: 'item' as const,
|
type: 'item' as const,
|
||||||
title: `Item ${i + 1}`,
|
title: `Item ${i + 1}`,
|
||||||
@@ -59,6 +59,8 @@ export function Inner() {
|
|||||||
return (
|
return (
|
||||||
<ListScrollProvider onScroll={onScrollWorklet}>
|
<ListScrollProvider onScroll={onScrollWorklet}>
|
||||||
<Layout.List<Item>
|
<Layout.List<Item>
|
||||||
|
windowSize={9}
|
||||||
|
maxToRenderPerBatch={5}
|
||||||
data={items}
|
data={items}
|
||||||
stickyHeaderIndices={[1]}
|
stickyHeaderIndices={[1]}
|
||||||
renderItem={({item, index}) => {
|
renderItem={({item, index}) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user