Skip to content

How to wrap @react-stately/collections's <Item/> (and preserve key) #1975

Answered by snowystinger
jrmyio asked this question in Q&A
Discussion options

You must be logged in to vote

We intend for Item to be the outermost in React Spectrum components.
If you're using our hooks though, you would probably want to create your own Item components. You could look at how we construct various Item components in order to make your own https://github.com/adobe/react-spectrum/search?q=getCollectionNode

In this particular case though, we’d recommend using the programmatic API to navigate between routes in onSelectionChange

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@angusd3v
Comment options

Answer selected by snowystinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants