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

Could useComponentRenderer be exported as a util? #1370

Open
dpeek opened this issue Jan 30, 2025 · 1 comment
Open

Could useComponentRenderer be exported as a util? #1370

dpeek opened this issue Jan 30, 2025 · 1 comment
Assignees
Labels
status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: question Community support but can be turned into an improvement

Comments

@dpeek
Copy link

dpeek commented Jan 30, 2025

I'd like to support the same render prop approach to composition for consistency with those provided by base-ui.

Could the useComponentRenderer utility be exported from @base-ui-components/react/utils?

Happy to create a PR if this sounds OK.

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 30, 2025
@zannager zannager added the support: question Community support but can be turned into an improvement label Jan 30, 2025
@mj12albert
Copy link
Member

@dpeek Could you share more about your use-case? I wonder if it may be similar as the use-case for the Slot utility

While discussing that we did consider that a hook may be a better abstraction than <Slot />

However useComponentRenderer is highly tailored for our internal use, so if we do provide this as a hook it would be a simplified version of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

4 participants