Skip to content
Source
Sign inSign up
TanStack/router

Misleading documentation for router to/from #3534

Send to my agent
Closedmitsuhiko(GitHub profile, opens in a new tab) opened this issue 1 comment

Which project does this relate to?

Router

Describe the bug

The navigation documentation currently states the following:

TanStack Router keeps this constant concept of relative navigation in mind for every navigation, so you'll constantly see two properties in the API:

  • from - The origin route ID
  • to - The destination route ID

I believe that this documentation is incorrect. The Link component clearly wants paths there. This is evidenced by trailingSlashes affecting all the link targets (need to be declared with or without trailing slash in to).

Your Example Website or App

https://tanstack.com/router/latest/docs/framework/react/guide/navigation

Steps to Reproduce the Bug or Issue

  1. Go to https://tanstack.com/router/latest/docs/framework/react/guide/navigation
  2. Read the first pargraph

Expected behavior

I believe the correct description is "the origin route path" and "the destination route path".

Screenshots or Videos

Image

Platform

This is a documentation issue

Additional context

No response

  1. schiller-manuel(GitHub profile, opens in a new tab) added labelsdocumentation

  2. @mitsuhiko is right. Also jsdoc/types have path for the type, not ID:

    Image

    I've made a quick PR fixing that 👇

Sign in to join this conversation.