Docs
Protocol Verified

[FIX-003] TanStack Router Ghost Navigation

The 'Logic Sinking' protocol to fix parent routes shadowing child components.

PRID: 1113
VERIFIED
1 min read

[FIX-003] TanStack Router Ghost Navigation

📝 Problem Background

A user clicks on a blog list item. The URL changes, and backend logs show the detail page loaded successfully, but the page remains on the list view without switching to the article content.

🧪 Effort Metrics

  • Attempt Count: 3
  • Time Spent: 30 min
  • Complexity: ⭐⭐⭐ (Tricky)

🔍 Root Cause Analysis

Shadowing: The list code was written directly in routes/$lang.blog.tsx (the parent layout) instead of using a separate index.tsx child route. The parent route lacked an <Outlet />, causing the child route's content to be loaded but physically "unplaceable."

🛠️ Fix Strategy

Logic Sinking Protocol (Hierarchy Ritual):

  • All list UI was stripped from the parent route and sunk into routes/$lang.blog.index.tsx.
  • The parent route was cleared, leaving only a transparent <Outlet /> container.

Result: Achieved physical unmounting of route components, improving performance and logical clarity.

Authority Distribution

Share this technical artifact