Feature request: List.LinkItem should extends Link (preact-router)
See original GitHub issueWhen navigating using
<a href="/somePath">Link</a>
<List.LinkItem href="/somePath">Link</List.LinkItem>
The whole app is rendered again.
When navigating using
<Link href="/somePath">Link</Link>
<List.Item onClick={() => route('/somePath')}>Link</List.Item>
Routing works as expected for a SPA
Would it be possible to either extends the Link
component from preact-router
or provide the same behavior when navigating, as well as the activeClassName
for List.LinkItem
as well as the other link components if there are others ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Feature Request: <Link component> - remix-run/react-router
TLDR: This will create a consistent interface in both react-router-dom and react-router-native , allowing code reuse. I just started building an app using...
Read more >Dealing with links in Next.js - LogRocket Blog
In this article, I'm going to explain two of my techniques for isolating routing in your application. I use Next as an example,...
Read more >Link v6.6.1 - React Router
In react-router-dom , a <Link> renders an accessible <a> element with a real href that points to the resource it's linking to. This...
Read more >next/link | Next.js
Client-side transitions between routes can be enabled via the Link component exported by next/link . For an example, consider a pages directory with...
Read more >Routing libraries - Material UI - MUI
For instance, using Next.js's Link or react-router. ... If your component is extending ButtonBase , providing a href prop enables the link mode....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should this really be included in this repo though? Preact can also be used with other routers, and this package doesn’t depend on
preact-router
, so I think it might be better to just useonClick
or extend the component yourself?I kinda agree with @filoozom because more prople use
react-router
thanpreact-router
.The best part with this is you can put and href and prevent event’s default and still call