Skip to content

[v6] When to use relative paths /? #8274

Closed Answered by mjackson
rwieruch asked this question in Q&A
Discussion options

You must be logged in to vote

The / is necessary on the <App> route because it is supposed to render when the URL is /. The <Teams> route can use teams or /teams as its path since its parent route path is just /. They are the same path. If the parent route path was /app, the path could be either teams or /app/teams. Specifying a leading / means you must build the entire route path from the root including all its parent paths.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alimertcakar
Comment options

Answer selected by mjackson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants