No longer needed, remix-run/react-router#5437 (comment)
This is a clone of Link, but it allows you to pass a component
property which will be used to render the DOM element being clicked (the traditional Link
component renders an <a>
element). Nothing else is changed.
It works exactly like Link
from react-router:
import {Link} from "evergreen-ui"
import ComponentLink from "react-router-component-link"
export default function Header () {
return <header>
Welcome to my special website, click <ComponentLink to="/heck" component={Link}>here to go to heck.</ComponentLink>
</header>
}
That's it.