-
In the documentation, I saw the following code snippet which confuses me regarding when to use relative paths and when not:
Is it necessary to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
The
/
is necessary on the<App>
route because it is supposed to render when the URL is /. The<Teams>
route can useteams
or/teams
as itspath
since its parent route path is just/
. They are the same path. If the parent route path was/app
, the path could be eitherteams
or/app/teams
. Specifying a leading/
means you must build the entire route path from the root including all its parent paths.