Skip to content
Source
Sign inSign up
TanStack/router

Route segments postfixed with _ aren't being included in params with `useParams` #5133

Send to my agent
Closedpaul-sachs(GitHub profile, opens in a new tab) opened this issue 2 comments

Which project does this relate to?

Router

Describe the bug

When using a directory that should skip matching the route using a postfixed _, any params that were postfixed with _ are getting excluded when using useParams({ from: "/test/$owner_" }). This used to work in 1.131.7 but no longer works in 1.131.40

Your Example Website or App

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

Steps to Reproduce the Bug or Issue

  1. Go to reproduction
  2. Click on New entity nav item
  3. Note that it outputs a blank {} in the content of the page

Expected behavior

I expected to see { owner: "x" } since that's the parameters that should be resolved according to the types.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.131.40
  • OS: macOS
  • Browser: Chrome
  • Browser Version: 139
  • Bundler: Vite
  • Bundler Version: 6.3.5

Additional context

No response

  1. thanks for reporting and providing the reproducer. I have located to cause and will release a fix shortly

  2. @nlynzaad Thanks so much for the quick turn around, you guys rock 🥳

Sign in to join this conversation.