-
Notifications
You must be signed in to change notification settings - Fork 265
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
forwardedRef incorrectly typed #393
Comments
Any update on this? |
PR's are welcome on this. We don't use TypeScript so we lean pretty heavily on the community to update this. |
I opened a PR #396 |
Thanks @TiagoPortfolio . Merged and released 0.1.13. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The prop
forwardedRef
, introduced here: https://github.com/FortAwesome/react-fontawesome/pull/341/files#diff-7aa4473ede4abd9ec099e87fec67fd57afafaf39e05d493ab4533acc38547eb8R24 seems to be incorrectly typed compared to React:The
ref
prop fromReact.forwardRef
is typed like this:https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L565
The
forwardedRef
prop from<FontAwesomeIcon />
expects the prop to be optional, not possibly null.Reproducible test case
https://codesandbox.io/s/confident-http-bpf4y?file=/src/Icon.tsx
Expected behavior
No type error.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: