-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[material-ui] Accessing element.ref was removed in React 19 #42604
Comments
Updated issue so it covers all cases and not only the Tooltip one. |
The Select component also appears the warning. My environment:
|
@luc-nham Right, we solved some of the instances of the issue but we didn't solve the issue. There are still hits for this: https://github.com/search?q=repo%3Amui%2Fmaterial-ui%20children.ref&type=code. Actually, we have 3 times the same components, so 3 times the same fix to apply?
At first sight, it doesn't seem to make sense, what's the direction? |
In React 19, ref is now a prop and should be accessed through
props.ref
. We have some instances of this we should fix: https://github.com/search?q=repo:mui/material-ui%20children.ref&type=codeExample with Tooltip
https://codesandbox.io/p/sandbox/silly-sea-m9cjyn?file=%2Fsrc%2FDemo.tsx
Context
material-ui/packages/mui-material/src/Tooltip/Tooltip.js
Line 560 in 5149a65
Your environment
react v19.0.0-rc.0
@mui/material v5.15.19
The text was updated successfully, but these errors were encountered: