Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the types for Link following recent preact type changes #474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

julienw
Copy link

@julienw julienw commented Dec 4, 2024

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.

@julienw
Copy link
Author

julienw commented Dec 4, 2024

You can reproduce the issue with a recent preact in https://stackblitz.com/edit/create-preact-starter-r4bjra?file=src%2Findex.tsx

@julienw
Copy link
Author

julienw commented Dec 4, 2024

ping @rschristian :-)

@rschristian
Copy link
Member

Warning

preact-router unfortunately 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 using preact-iso for 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.

@julienw
Copy link
Author

julienw commented Dec 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants