This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Link Component] Accessing element.ref was removed in React 19 #72873
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Upstream
Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Link to the code that reproduces this issue
https://github.com/gagzu/nextjs-issue-link-component-example
To Reproduce
To reproduce the error:
yarn install
yarn dev
Current vs. Expected behavior
The error I'm getting is: "Accessing element.ref was removed in React 19." The error is due to the Link component using
forwardRef
.The expected result is: Not seeing any error in the console.
Provide environment information
information about my environment: Operating System: Platform: linux Arch: x64 Version: #135~20.04.1-Ubuntu SMP Mon Oct 7 13:56:22 UTC 2024 Available memory (MB): 15871 Available CPU cores: 4 Binaries: Node: 20.9.0 npm: 10.1.0 Yarn: 1.22.22 pnpm: N/A Relevant Packages: next: 15.0.4-canary.13 // Latest available version is detected (15.0.4-canary.13). eslint-config-next: 15.0.3 react: 19.0.0-rc.1 react-dom: 19.0.0-rc.1 typescript: 5.6.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: