Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider only accepting render prop as children of React VList/Virtualizer #511

Open
inokawa opened this issue Sep 12, 2024 · 0 comments
Open

Comments

@inokawa
Copy link
Owner

inokawa commented Sep 12, 2024

Is your feature request related to a problem? Please describe.

React VList/Virtualizer accepts both elements and render props as its children. Both have trade-offs for perf explained here and it's a little confusing. Maybe we can merge them into one with a strategy like useCachedChildren of react-aria.

Describe the solution you'd like
Fix React VList/Virtualizer to accept only render prop.

If we do it, we have to take care about:

  • It will disable the ability to render header/footer element as children. Probably we can do the same thing with Virtualizer and its startMargin prop. We have to check it's enough for the usecase.
  • It will disable the ability to accept RSC as its children (maybe not used often though).

Describe alternatives you've considered
Accept both elements and render prop as before.

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant