The PolymorphicRef Type

Understand how to type the ref property of a polymorphic component.

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 ...