Open
Description
Problem
The warnOnce
logic is duplicated all over the place in the MUI codebase:
- MUI X: there are a couple of identical helpers https://github.com/search?q=org%3Amui+%22function+warnOnce%28%22&type=code
- MUI: duplicate the logic too: https://github.com/mui/mui-x/blob/13a2ff112d2a7dec41625b06db04db860f590f58/packages/x-data-grid/src/components/GridPagination.tsx#L132
- Material UI: duplicate the logic: https://github.com/mui/material-ui/blob/9e18971ee00c222c1ae317d673555187c9982ca2/packages/mui-material/src/Tabs/Tabs.js#L419
- Base UI: seems to do nothing yet, but we need to create something to improve the DX.
Context
I initially worked on this because of mui/mui-x#13911. This looks like a perfect helper for @base-ui/internals
per https://www.notion.so/mui-org/engineering-mui-utils-purpose-9a9fc9da3a004864b6c4e1f4d1f24f95.
Search keywords: