Skip to content

Commit 85f498c

Browse files
committed
Fix contextual router syntax in docs.
Previous syntax did not handle contextual router bases without the trailing slash.
1 parent 33b1a4e commit 85f498c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/contextual.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ unmatched part of the parent router.
1010
return (
1111
<Locations>
1212
<Location path="/" handler={MainPage} />
13-
<Location path="/photos/*" handler={Photos} />
13+
<Location path="/photos(/*)" handler={Photos} />
1414
</Locations>
1515
)
1616
}
@@ -31,7 +31,7 @@ unmatched part of the parent router.
3131
Now the application would have the following routes:
3232

3333
- `/` dispatches to a `MainPage`
34-
- `/photos/` dispatches to a `AlbumPage`
34+
- `/photos/` or `/photos` dispatches to a `AlbumPage`
3535
- `/photos/:slug` dispatches to a `PhotoPage`
3636

3737
If you use `Link` components inside a contextual router, its `href` would be

0 commit comments

Comments
 (0)