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 route handling in Preact 10 (fixes #340) #342

Merged
merged 2 commits into from
Oct 21, 2019

Conversation

developit
Copy link
Member

In Preact X, .forceUpdate() is no longer synchronous. Thankfully, preact-router was relying on this without much reason. The computation of "did this router handle the link" was already being done twice, all I had to do was switch the return value to rely on the synchronous one.

Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one 👍

Copy link
Member

@cristianbote cristianbote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 this is awesome 🙂

@marvinhagemeister marvinhagemeister merged commit d63d776 into master Oct 21, 2019
@marvinhagemeister marvinhagemeister deleted the fix-routing-in-x branch October 21, 2019 06:46
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.

4 participants