Make ref optional in @mui/base#43792
Conversation
Netlify deploy previewhttps://deploy-preview-43792--material-ui.netlify.app/ Bundle size report |
|
The types you're editing are types of props supplied to slot components. |
IIUC,
If this was only there to enforce it internally, then I don't think this would be a breaking change. And if the previous point is true, then it wasn't working as intended anyways. |
|
Side note: I wanted top verify the PR on the preview site's codesandbox, but for some reason there's no Netlify build for it |
Not optional, but nullable: ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;Also, But anyway, you're right that it shouldn't be a problem today for React < 19 users. |
I meant the property in the resulting component after calling Alternatives that I could come up with:
Both of which would be breaking on the user side. I can't think of a situation where the user would rely on this property being required. I've changed base to master and pushed an empty commit to trigger a netlify build |
Attempt at addressing issues in #43555
It seems to me like this should be optional, but I'm not quite sure if I'm creating some 2nd order effects. Putting it up on a separate PR for review.