Skip to content

[core] Remove useComponentRenderer #2055

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

Merged
merged 4 commits into from
Jun 5, 2025

Conversation

atomiks
Copy link
Contributor

@atomiks atomiks commented Jun 3, 2025

@atomiks atomiks added the core DO NOT USE. This label has been deprecated and replaced by `all components` and `internal`. label Jun 3, 2025
Copy link

pkg-pr-new bot commented Jun 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@base-ui-components/react@2055

commit: f00f866

@mui-bot
Copy link

mui-bot commented Jun 3, 2025

Bundle size report

Total Size Change:${\tiny{\color{green}▼}}$-1.32KB(-0.09%) - Total Gzip Change:${\tiny{\color{green}▼}}$-1.1KB(-0.23%)
Files: 41 total (0 added, 0 removed, 36 changed)

Show 36 more bundle changes

@base-ui-components/reactparsed:${\tiny{\color{green}▼}}$-136B(-0.05%) gzip:${\tiny{\color{green}▼}}$-89B(-0.10%)
@base-ui-components/react/alert-dialogparsed:${\tiny{\color{green}▼}}$-86B(-0.17%) gzip:${\tiny{\color{green}▼}}$-37B(-0.21%)
@base-ui-components/react/dialogparsed:${\tiny{\color{green}▼}}$-85B(-0.16%) gzip:${\tiny{\color{green}▼}}$-41B(-0.24%)
@base-ui-components/react/context-menuparsed:${\tiny{\color{green}▼}}$-82B(-0.07%) gzip:${\tiny{\color{green}▼}}$-63B(-0.17%)
@base-ui-components/react/menuparsed:${\tiny{\color{green}▼}}$-67B(-0.06%) gzip:${\tiny{\color{green}▼}}$-64B(-0.17%)
@base-ui-components/react/selectparsed:${\tiny{\color{green}▼}}$-52B(-0.05%) gzip:${\tiny{\color{green}▼}}$-46B(-0.12%)
@base-ui-components/react/popoverparsed:${\tiny{\color{green}▼}}$-46B(-0.05%) gzip:${\tiny{\color{green}▼}}$-36B(-0.12%)
@base-ui-components/react/toggle-groupparsed:${\tiny{\color{green}▼}}$-41B(-0.30%) gzip:${\tiny{\color{green}▼}}$-24B(-0.45%)
@base-ui-components/react/radio-groupparsed:${\tiny{\color{green}▼}}$-37B(-0.19%) gzip:${\tiny{\color{green}▼}}$-20B(-0.27%)
@base-ui-components/react/switchparsed:${\tiny{\color{green}▼}}$-36B(-0.25%) gzip:${\tiny{\color{green}▼}}$-25B(-0.45%)
@base-ui-components/react/tabsparsed:${\tiny{\color{green}▼}}$-35B(-0.15%) gzip:${\tiny{\color{green}▼}}$-28B(-0.32%)
@base-ui-components/react/preview-cardparsed:${\tiny{\color{green}▼}}$-34B(-0.06%) gzip:${\tiny{\color{green}▼}}$-26B(-0.13%)
@base-ui-components/react/tooltipparsed:${\tiny{\color{green}▼}}$-34B(-0.05%) gzip:${\tiny{\color{green}▼}}$-29B(-0.13%)
@base-ui-components/react/collapsibleparsed:${\tiny{\color{green}▼}}$-32B(-0.18%) gzip:${\tiny{\color{green}▼}}$-27B(-0.43%)
@base-ui-components/react/scroll-areaparsed:${\tiny{\color{green}▼}}$-32B(-0.20%) gzip:${\tiny{\color{green}▼}}$-22B(-0.39%)
@base-ui-components/react/toolbarparsed:${\tiny{\color{green}▼}}$-32B(-0.17%) gzip:${\tiny{\color{green}▼}}$-21B(-0.32%)
@base-ui-components/react/checkboxparsed:${\tiny{\color{green}▼}}$-31B(-0.17%) gzip:${\tiny{\color{green}▼}}$-23B(-0.34%)
@base-ui-components/react/fieldparsed:${\tiny{\color{green}▼}}$-31B(-0.23%) gzip:${\tiny{\color{green}▼}}$-23B(-0.44%)
@base-ui-components/react/accordionparsed:${\tiny{\color{green}▼}}$-30B(-0.13%) gzip:${\tiny{\color{green}▼}}$-26B(-0.33%)
Base UI checkboxparsed:${\tiny{\color{green}▼}}$-30B(-0.17%) gzip:${\tiny{\color{green}▼}}$-18B(-0.27%)
@base-ui-components/react/menubarparsed:${\tiny{\color{green}▼}}$-28B(-0.14%) gzip:${\tiny{\color{green}▼}}$-28B(-0.38%)
@base-ui-components/react/navigation-menuparsed:${\tiny{\color{green}▼}}$-28B(-0.03%) gzip:${\tiny{\color{green}▼}}$-38B(-0.13%)
@base-ui-components/react/radioparsed:${\tiny{\color{green}▼}}$-28B(-0.19%) gzip:${\tiny{\color{green}▼}}$-27B(-0.48%)
@base-ui-components/react/toastparsed:${\tiny{\color{green}▼}}$-28B(-0.11%) gzip:${\tiny{\color{green}▼}}$-27B(-0.28%)
@base-ui-components/react/number-fieldparsed:${\tiny{\color{green}▼}}$-26B(-0.09%) gzip:${\tiny{\color{green}▼}}$-23B(-0.22%)
@base-ui-components/react/avatarparsed:${\tiny{\color{green}▼}}$-22B(-0.32%) gzip:${\tiny{\color{green}▼}}$-24B(-0.85%)
@base-ui-components/react/fieldsetparsed:${\tiny{\color{green}▼}}$-22B(-0.41%) gzip:${\tiny{\color{green}▼}}$-24B(-1.04%)
@base-ui-components/react/inputparsed:${\tiny{\color{green}▼}}$-22B(-0.20%) gzip:${\tiny{\color{green}▼}}$-28B(-0.64%)
@base-ui-components/react/meterparsed:${\tiny{\color{green}▼}}$-22B(-0.33%) gzip:${\tiny{\color{green}▼}}$-28B(-0.99%)
@base-ui-components/react/progressparsed:${\tiny{\color{green}▼}}$-22B(-0.29%) gzip:${\tiny{\color{green}▼}}$-29B(-0.95%)
@base-ui-components/react/toggleparsed:${\tiny{\color{green}▼}}$-22B(-0.24%) gzip:${\tiny{\color{green}▼}}$-27B(-0.74%)
@base-ui-components/react/checkbox-groupparsed:${\tiny{\color{green}▼}}$-15B(-0.13%) gzip:${\tiny{\color{green}▼}}$-17B(-0.37%)
@base-ui-components/react/sliderparsed:${\tiny{\color{green}▼}}$-15B(-0.06%) gzip:${\tiny{\color{green}▼}}$-33B(-0.36%)
@base-ui-components/react/separatorparsed:${\tiny{\color{green}▼}}$-12B(-0.30%) gzip:${\tiny{\color{green}▼}}$-24B(-1.38%)
@base-ui-components/react/formparsed:${\tiny{\color{green}▼}}$-8B(-0.14%) gzip:${\tiny{\color{green}▼}}$-19B(-0.77%)
@base-ui-components/react/use-renderparsed:${\tiny{\color{green}▼}}$-8B(-0.21%) gzip:${\tiny{\color{green}▼}}$-20B(-1.20%)

Details of bundle changes

Generated by 🚫 dangerJS against f00f866

Copy link

netlify bot commented Jun 3, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit f00f866
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/683ed109b38f630008f53e23
😎 Deploy Preview https://deploy-preview-2055--base-ui.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.

@atomiks atomiks marked this pull request as ready for review June 3, 2025 10:32
ref: forwardedRef,
props: [elementProps, { id }],
props: [{ id }, elementProps],
Copy link
Member

Choose a reason for hiding this comment

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

This actually doesn't matter as elementProps can't contain id.

Copy link
Contributor

@romgrk romgrk Jun 4, 2025

Choose a reason for hiding this comment

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

Sidenote on perf, I've been looking into having uRE automatically handle merging componentProps minus render & className into props, it would avoid destructuring into elementProps for some components (those that don't extract more props out of componentProps). The only thing stopping me right now is that some components don't have elementProps as the final element in the props array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@michaldudak yeah, but each component was doing something different - just changed to be the most consistent

@atomiks atomiks merged commit bc5543b into mui:master Jun 5, 2025
22 checks passed
@atomiks atomiks deleted the refactor/remove-use-component-renderer branch June 5, 2025 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core DO NOT USE. This label has been deprecated and replaced by `all components` and `internal`.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants