What I am trying to do is to use button as an anchor element. Since there is support for the component prop to substitute default button element with a custom one and extraProps prop to provide any props to that component, I expect those props to be typed as variable type depending on the component provided, but that is not the case.
What I am trying to do is to use button as an anchor element. Since there is support for the
component
prop to substitute defaultbutton
element with a custom one andextraProps
prop to provide any props to that component, I expect those props to be typed as variable type depending on the component provided, but that is not the case.Actual typing is non-generic
react-router
uses prop namedto
instead ofhref
, so I get a typescript error.Example