Skip to content

fix(nuxt): delay navigation until user input is acknowledged#27743

Merged
danielroe merged 2 commits intomainfrom
fix/router-delay
Jun 20, 2024
Merged

fix(nuxt): delay navigation until user input is acknowledged#27743
danielroe merged 2 commits intomainfrom
fix/router-delay

Conversation

@danielroe
Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #26271

📚 Description

This adds a requestAnimationFrame before completing navigation on client-side, which can reduce INP by giving an opportunity for the browser to repaint, acknowledging user interaction.

See https://vercel.com/blog/demystifying-inp-new-tools-and-actionable-insights, where the code/implementation was taken from.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added the bug label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

identify opportunities to improve INP on mobile devices

1 participant