Skip to content

How to reimplement the "wrapper" from getCollectionNode in the new CollectionBuilder from a "@react-aria/collections"? #8232

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

You must be logged in to vote

We have contemplated opening createBranchComponent in the same way as createLeafComponent. I think I explored in in a PR at one point. This one https://github.com/adobe/react-spectrum/pull/7289/files
We decided on a different way to implement it. Maybe this can help you as well so that you don't need collections inside every component of yours.

We'll likely have to solve something similar when we get to Coachmarks as well. I know an approach we've used in the past has been to render the overlays separately, and position them by finding the target in the dom. We'd also like to avoid that because it typically means needing to implement polling and retry logic, but it could work for now.

Replies: 1 comment 1 reply

Comment options

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

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