Created
October 10, 2022 16:37
-
-
Save athospg/7998099c5a95b8fbe384a6a88140c605 to your computer and use it in GitHub Desktop.
React forwardRef with generic type
This file contains 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
declare module 'react' { | |
function forwardRef<T, P = {}>( | |
render: (props: P, ref: React.Ref<T>) => React.ReactElement | null, | |
): (props: P & React.RefAttributes<T>) => React.ReactElement | null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment