Skip to content
Source
Sign inSign up
TanStack/router

Route params with trailing underscore ($param_) do not update when navigating #5164

Send to my agent
Closedfedeq(GitHub profile, opens in a new tab) opened this issue 4 comments

Which project does this relate to?

Router

Describe the bug

When defining a route param with an underscore suffix (e.g. $owner_), the param does not update when navigating between links that change the param value. Instead, the first visited value is “stuck” and reused, even though the URL changes.

Your Example Website or App

https://stackblitz.com/edit/github-z1rasdxr-lgf2emct?file=src%2Froutes%2Ftest%2F%24owner_%2Froute.tsx

Steps to Reproduce the Bug or Issue

  1. Navigate to Owner X1
  2. Navigate to Owner X2

Expected behavior

When navigating to the link with owner: "x2", the rendered params should update to { owner: "x2" }

Screenshots or Videos

https://github.com/user-attachments/assets/272ab757-a6c6-4631-ac9f-d604dfc7ef4b

Platform

  • Router / Start Version: 1.131.44
  • OS: Windows
  • Browser: Chrome
  • Browser Version: 139.0.7258.155
  • Bundler: vite
  • Bundler Version: 6.3.5

Additional context

No response

  1. @nlynzaad

    If you’re not already working on it, would it be okay if I try to resolve the issue myself?

  2. @nlynzaad

    If you’re not already working on it, would it be okay if I try to resolve the issue myself?

    Thanks for offering. Seems I found the underlying cause, just awaiting review now.

  3. @nlynzaad If you’re not already working on it, would it be okay if I try to resolve the issue myself?

    Thanks for offering. Seems I found the underlying cause, just awaiting review now.

    You worked really quickly on this — thank you for letting me know😄

Sign in to join this conversation.