[core] Bring useId() to Base UI #616
Labels
core
Infrastructure work going on behind the scenes
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Summary
The logic we have in here:
base-ui/packages/mui-base/src/utils/useId.ts
Line 4 in 890b49e
made sense in the context of moving Base UI out of http://github.com/mui/material-ui to its own repository quickly.
But it makes no sense in the long term. We want the dependency tree of @base-ui/react to be as lean as possible. It can't have @mui/ dependencies. So I believe it should work the other way around: be a helper that Base UI exposes for Material UI, MUI X, etc. https://npm.anvaka.com/#/view/2d/%2540base_ui%252Freact
Examples
No response
Motivation
This is a subset of https://www.notion.so/mui-org/engineering-mui-utils-purpose-9a9fc9da3a004864b6c4e1f4d1f24f95.
Also to be noted that this logic will stay duplicated in the bundle of users. It duplicate with: https://github.com/floating-ui/floating-ui/blob/2f5132ede1f02758bc5f8b96647e97deb546771c/packages/react/src/hooks/useId.ts#L39. If we really want to obsess over bundle size, I see two possible solutions:
Search keywords: -
The text was updated successfully, but these errors were encountered: