router icon indicating copy to clipboard operation
router copied to clipboard

`Route.fullPath` is typed incorrectly when using path params

Open Tiedye opened this issue 1 year ago • 0 comments

Describe the bug

The type of Route.fullPath is more or less the path that is passed to the createRoute function, but during runtime it is the current path of the page when Route,fullPath references a path with a paramater, which included the sub path, this makes it useless as a from parameter when used in a layout route.

Your Example Website or App

https://stackblitz.com/edit/github-jhyjxh?file=src%2Froutes%2F%24subsection.tsx

Steps to Reproduce the Bug or Issue

Click on sub, click on the links and see every navigation is relative to the current url instead of the expected Route.fullPath

Expected behavior

Not that, the same as for static routes

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox
  • Version: 128a

Additional context

No response

Tiedye avatar May 24 '24 18:05 Tiedye