Skip to content

fix: stop fallback matching when a route is skipped during SSR#113

Merged
uhyo merged 2 commits intomasterfrom
fix/skip-fallback-matching-ssr
Feb 21, 2026
Merged

fix: stop fallback matching when a route is skipped during SSR#113
uhyo merged 2 commits intomasterfrom
fix/skip-fallback-matching-ssr

Conversation

@uhyo
Copy link
Owner

@uhyo uhyo commented Feb 21, 2026

Summary

  • When skipLoaders: true and a route with a loader would match the current path, return a SKIPPED sentinel instead of null. This prevents catch-all routes from incorrectly matching during SSR, which caused a flash on hydration.
  • Updated docs site and examples to use path: "/*" for catch-all routes instead of pathless routes.

Test plan

  • Updated existing tests to reflect new behavior (skipped route blocks catch-all siblings)
  • Added new tests: non-matching loader route doesn't block siblings, skipped child prevents catch-all with parent shell, skipped pathless loader blocks siblings
  • pnpm test:run — 226 tests pass
  • pnpm typecheck — no type errors
  • pnpm build — builds successfully (including docs site with updated routes)

🤖 Generated with Claude Code

uhyo and others added 2 commits February 21, 2026 14:04
When skipLoaders is true and a route with a loader would match the
current path, return a SKIPPED sentinel instead of null. This prevents
catch-all routes from incorrectly matching during SSR, which caused a
404 flash on hydration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change the docs site and examples to use `path: "/*"` for catch-all
routes instead of pathless routes. Path-based catch-all routes behave
correctly during SSR because they don't match when the pathname is
unknown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@uhyo uhyo merged commit bbe1ac8 into master Feb 21, 2026
1 check passed
@uhyo uhyo deleted the fix/skip-fallback-matching-ssr branch February 21, 2026 05:07
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