Created
December 22, 2022 18:26
-
-
Save irvingvjuarez/72ee31024db1757d876f399f5aa97bdc to your computer and use it in GitHub Desktop.
How to type a forwardRef component in TS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const Input = React.forwardRef<refType, propsType>((props, ref) => { | |
return ( | |
<input ref={ref} /> | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment