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

Update React components to use React.forwardRef() #910

Closed
joshblack opened this issue Jan 27, 2023 · 1 comment · Fixed by #943
Closed

Update React components to use React.forwardRef() #910

joshblack opened this issue Jan 27, 2023 · 1 comment · Fixed by #943
Assignees

Comments

@joshblack
Copy link
Member

Currently our Icon components are exported as plain functional components. It would be great if we included support for forwarding refs through React.forwardRef(), however this is only available past React v16.3. Currently, the project lists React v15 as a peer dependency.

It seems like we have a couple of paths forward:

  • Increase the peer dependency range, but still include v15, and try and feature detect forwardRef. This would land in a minor change to the package
  • Increase the peer dependency range explicitly to >=v16.3 and unconditionally use forwardRef. This would land in a major change to the package
@lesliecdubs
Copy link
Member

lesliecdubs commented Apr 17, 2023

Open question that came up at PRC maintainer's sync: is there any issue with releasing this major change we would need to account for?

@colebemis has the most context on this repo and said it's a pretty safe breaking change to go ahead and make, but feel free to coordinate directly as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants