Skip to content

fix: nav links unresponsive during hydration#60

Merged
cahaseler merged 1 commit intomainfrom
worktree-clickable-links
Mar 9, 2026
Merged

fix: nav links unresponsive during hydration#60
cahaseler merged 1 commit intomainfrom
worktree-clickable-links

Conversation

@cahaseler
Copy link
Contributor

Summary

  • Moved <Nav /> and <Footer /> outside the <NuqsAdapter> wrapper in the root layout
  • Neither component uses nuqs, so they don't need to be inside the adapter
  • This lets them hydrate as independent React client component islands instead of waiting for the entire page tree (including heavy components like GalaxyMap) to finish hydrating

Problem

Nav header links didn't respond to regular clicks for the first few seconds after page load. Middle-click (open in new tab) worked because it bypasses React's event system. Root cause: NuqsAdapter is a 'use client' component that wrapped the entire page tree. React 18 captures click events during hydration and replays them only after the full subtree hydrates.

Test plan

  • Load the homepage and immediately click nav links — they should work instantly
  • Verify the Explore dropdown, mobile menu, and all nav links still function
  • Verify nuqs-dependent features (market filters, etc.) still work

… clicks

Nav links were unresponsive for the first few seconds after page load
because NuqsAdapter (a client component) wrapped the entire page tree.
React 18 captures click events during hydration and replays them only
after the full subtree hydrates — heavy page content like GalaxyMap
delayed this significantly. Moving Nav and Footer outside lets them
hydrate as independent islands.
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
www Building Building Preview, Comment Mar 9, 2026 11:17am

Request Review

@cahaseler cahaseler merged commit c600ee9 into main Mar 9, 2026
2 of 3 checks passed
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.

1 participant