Skip to content

Commit c47464c

Browse files
committed
Clarify relative="path" docs
1 parent 426b055 commit c47464c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/components/link.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ A relative `<Link to>` value (that does not begin with `/`) resolves relative to
6565

6666
## `relative`
6767

68-
By default, links are relative to the route hierarchy (`relative="route"`), so `..` will go up one `Route` level. Occasionally, you may find that you have matching URL patterns that do not make sense to be nested, and you'd prefer to use relative _path_ routing. You can opt into this behavior with `relative="path"`:
68+
By default, links are relative to the route hierarchy (`relative="route"`), so `..` will go up one `Route` level from the current contextual route. Occasionally, you may find that you have matching URL patterns that do not make sense to be nested, and you'd prefer to use relative _path_ routing from the current contextual route path. You can opt into this behavior with `relative="path"`:
6969

7070
```jsx
7171
// Contact and EditContact do not share additional UI layout
@@ -79,7 +79,8 @@ By default, links are relative to the route hierarchy (`relative="route"`), so `
7979

8080
function EditContact() {
8181
// Since Contact is not a parent of EditContact we need to go up one level
82-
// in the path, instead of one level in the Route hierarchy
82+
// in the current contextual route path, instead of one level in the Route
83+
// hierarchy
8384
return (
8485
<Link to=".." relative="path">
8586
Cancel

0 commit comments

Comments
 (0)