preact-router
preact-router copied to clipboard
Fix the types for Link following recent preact type changes
In Preact 10.25 the types were made stricter (see https://github.com/preactjs/preact/pull/4546/files). As a result, href was removed from HTMLAttributes and links now use HTMLAnchorAttributes.
By using preact.JSX.IntrinsicElements['a'] we support both versions of preact.
You can reproduce the issue with a recent preact in https://stackblitz.com/edit/create-preact-starter-r4bjra?file=src%2Findex.tsx
ping @rschristian :-)
[!WARNING]
preact-routerunfortunately no longer sees active development! It's completely stable and so you can rely upon it for all existing apps, but for newer ones, we'd recommend usingpreact-isofor your routing needs instead. It offers a very similar API while integrating a bit better Suspense and lazy loading, with potentially more useful hooks. Thanks to all the contributors and users over the years!
https://github.com/preactjs/preact-router?tab=readme-ov-file#preact-router
Sorry but there will be no new releases of preact-router.
Ah yeah I've seen the warning but I was hoping there could still be maintenance releases for small things like this.
In that case it might be good to archive the repository :-) as a sign that zero development will happen anymore.