-
Notifications
You must be signed in to change notification settings - Fork 821
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
[Slot] React 18.3.0 canary, ref is now a regular prop #2769
Comments
is this a bug or we need to fix this? |
I think this is a bug |
any resolution to this? I am having the same issue and I do not understrand if it is something I am doing wrong or it is a bug in React? this is what I currently have export function Test(props) { test component ); } |
This is a warning rather than a React bug. Based on my understanding of facebook/react#28348, From [UPDATE] So I misinterpreted the warning, it's about accessing the ref via |
Seeing the same error for a while now.
|
I'm seeing this with other Radix components too
|
Is there any word on how to solve this / this bug will be resolved soon? |
Hey, does anyone you know if there is a way to minimise the size of this warning in the console? In my Nextjs app I get a 75 line trace log twice every time I boot up the dev server. Thanks to the people working on the issue! |
For the time being, you could patch the package via |
Upgrading to React 19 removes this warning. |
Yes and no, upgrade to React 19 will remove the warning, but it will throw an error instead when it is about to execute the line. |
any update on how to get rid of it? |
This is fixed in the new release candidate versions – please let us know if you run into any other issues with React 19 |
Hi @vladmoroz thanks! |
Yep, React 16.8 throughout React 19 are supported |
Bug report
Current Behavior
Next.js 14.1.1-canary.74 is pulling in the latest React 18.3.0 canary release has this upstream change: Pass ref as normal prop (#28348). This is throwing a warning:
Warning: Accessing element.ref is no longer supported. ref is now a regular prop. It will be removed from the JSX Element type in a future release.
I assume it is the following line of code that is causing the warning:
primitives/packages/react/slot/src/Slot.tsx
Line 66 in be80c2a
Full error message
Expected behaviour
No warning
Reproducible example
Will update with a repro
Suggested solution
n/a
Additional context
I am using Radix via shadcn-ui
Your environment
The text was updated successfully, but these errors were encountered: