The PolymorphicRef Type
Understand how to type the ref property of a polymorphic component.
We'll cover the following...
Let’s now turn our attention to the PolymorphicRef
type. If we must support refs in our polymorphic component implementation, then we need to type the ref
prop correctly.
The ComponentPropsWithRef
type
So, how can we get the type of ref
object passed to the rendered component, based on the ...