Skip to content
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

No need for forwardRef with React 19 #2579

Closed
vaarvik opened this issue Oct 7, 2024 · 1 comment
Closed

No need for forwardRef with React 19 #2579

vaarvik opened this issue Oct 7, 2024 · 1 comment

Comments

@vaarvik
Copy link

vaarvik commented Oct 7, 2024

Description

With React 19 forwardRef can be replaced by a simple ref: https://react.dev/blog/2024/04/25/react-19#ref-as-a-prop

Additional Information

No response

@Barsnes
Copy link
Member

Barsnes commented Oct 8, 2024

Hi, thanks for the issue!
We still need to be backwards compatible with react 18, which we are also still on.
React 19 is still not released, and we would need to update to be able to use it, which is still a bit further down the road for us at the moment.

Due to the need to support backwards compatibility, we might need to keep using forwardRef for the forseeable future. It won't be removed in react 19, so it is fine to keep it as is for now,

@mrosvik mrosvik closed this as completed Oct 9, 2024
@github-project-automation github-project-automation bot moved this from 🔵 Inbox to ✅ Done in Team Design System Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants