How to change refType in forwardRef based on prop?

imagine you want a React component to have a certain ref type if some prop is present, and another ref type if other prop is present. How you'd achieve it? say, if it has "disabled" or "type" you want ButtonElement, and if there's "to" or "href" you want AnchorElement
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server