Closed teodragovic closed 3 years ago
This is already how preact-router works, just you need to use <a>
instead of <Link>
.
<Link>
is for forcing URLs through the router, most folks should just be using <a href="/">
- any links to external domains will be processed by the browser itself.
My use case is this: I have an array of nav links where some are local to the app and some lead to other domain.
For non-local links, I force native behavior by doing
<Link native={url.startsWith('http')}>
.Would it make sense to do this check on router level? If so, I can make a PR.