Closed
Description
It would be awesome if the example was updated so that the accepted props changed depending on what as
prop was passed. For example. Passing as='button'
and then passing a href
prop would result in a compiler error. I've been trying to figure out how to do this but not had much luck!
Here's an incomplete attempt: https://stackoverflow.com/questions/58200824/generic-react-typescript-component-with-as-prop-able-to-render-any-valid-dom
🤔😫