Skip to content

Polymorphism and refs types #665

Answered by jjenzz
DaniGuardiola asked this question in Help
Discussion options

You must be logged in to vote

This looks like it could be a bug as I would have expected you would be able to do the following which also doesn't work:

const ref = React.useRef<HTMLButtonElement | HTMLDivElement>(null);

It appears this should be possible so I'll raise an issue from this discussion for us to look into further.

EDIT: I've raised the issue here if you'd like to follow progress.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DaniGuardiola
Comment options

Answer selected by DaniGuardiola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants