Skip to content

Add VirtualColumn and VirtualRow docs - #4845

Open
lunaleaps wants to merge 3 commits into
react:mainfrom
lunaleaps:virtual-column-row
Open

Add VirtualColumn and VirtualRow docs#4845
lunaleaps wants to merge 3 commits into
react:mainfrom
lunaleaps:virtual-column-row

Conversation

@lunaleaps

@lunaleaps lunaleaps commented Oct 11, 2025

Copy link
Copy Markdown
Contributor

Add VirtualColumn and VirtualRow docs
See VirtualColumn docs

See VirtualRow docs

@netlify

netlify Bot commented Oct 11, 2025

Copy link
Copy Markdown

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit c162d6b
🔍 Latest deploy log https://app.netlify.com/projects/react-native/deploys/68ed296d6e1393000830bd6f
😎 Deploy Preview https://deploy-preview-4845--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lunaleaps
lunaleaps requested a review from yungsters October 13, 2025 16:08
Comment thread docs/virtualcolumn.md

### Item Rendering

`VirtualColumn` expects an immutable `VirtualCollection` of items and an `itemsToKey` function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`VirtualColumn` expects an immutable `VirtualCollection` of items and an `itemsToKey` function.
`VirtualColumn` expects an immutable `VirtualCollection` of items and an `itemToKey` function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc sometimes uses both itemsToKey and itemToKey, I assume that only one is correct.

Comment thread docs/virtualcolumn.md

`VirtualColumn` expects an immutable `VirtualCollection` of items and an `itemsToKey` function.

When `VirtualColumn` renders an item, it calls the `children` render function once and memoizes the result. If an item changes, a new item should be provided with the same key. Items with identical keys, as returned by `itemsToKey`, will update the same React element.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto: itemToKey

@cipolleschi

Copy link
Copy Markdown
Contributor

@lunaleaps do we need it in the 0.83 release?

Comment thread docs/virtualcolumn.md
<ScrollView>
<VirtualColumn
items={new VirtualArray(items)}>
{(item, key) => <Text>{item.value}</Text>}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key is not used here, is it deliberate?

Suggested change
{(item, key) => <Text>{item.value}</Text>}
{(item, key) => <Text key={key}>{item.value}</Text>}

注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

项目

None yet

Development

Successfully merging this pull request may close these issues.

5 participants