Closed nlkluth closed 10 months ago
Adds Polymorphic types for components
To be more generic, allowing as prop for rendering.
as
Turn a component that renders a button into a link with as="a". All of the HTMLAnchorElement types now show and are allowed.
as="a"
HTMLAnchorElement
The latest updates on your projects. Learn more about Vercel for Git ↗︎
What
Adds Polymorphic types for components
Why
To be more generic, allowing
as
prop for rendering.Example
Turn a component that renders a button into a link with
as="a"
. All of theHTMLAnchorElement
types now show and are allowed.See also