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

(preact-iso): register link click handler immediately to prevent race condition #594

Merged
merged 2 commits into from
May 5, 2021

Conversation

developit
Copy link
Member

This was using useEffect() to register the handler, but that waits 1 rAF. During the frame delay, clicks are ignored by the router.

@changeset-bot
Copy link

changeset-bot bot commented May 5, 2021

🦋 Changeset detected

Latest commit: 79c7fd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-iso Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2021

Size Change: -9 B (0%)

Total Size: 5.92 kB

Filename Size Change
packages/preact-iso/.dist/index.********.js 1.56 kB -4 B (0%)
packages/preact-iso/.dist/prerender.********.js 338 B -3 B (-1%)
packages/preact-iso/router.js 2.32 kB -2 B (0%)
ℹ️ View Unchanged
Filename Size Change
packages/preact-iso/hydrate.js 290 B 0 B
packages/preact-iso/index.js 191 B 0 B
packages/preact-iso/lazy.js 594 B 0 B
packages/preact-iso/prerender.js 629 B 0 B

compressed-size-action

@marvinhagemeister marvinhagemeister merged commit 98df34a into main May 5, 2021
@marvinhagemeister marvinhagemeister deleted the iso-router-link-handler-race branch May 5, 2021 20:30
@github-actions github-actions bot mentioned this pull request May 5, 2021
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.

None yet

2 participants