Skip to content

Commit 9d95102

Browse files
committed
Merge pull request #2214 from fjaguero/patch-1
[Docs] Add path syntax example
2 parents e9067ff + 96e445c commit 9d95102

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/guides/basics/RouteMatching.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ A route path is [a string pattern](/docs/Glossary.md#routepattern) that is used
2020
<Route path="/hello/:name"> // matches /hello/michael and /hello/ryan
2121
<Route path="/hello(/:name)"> // matches /hello, /hello/michael, and /hello/ryan
2222
<Route path="/files/*.*"> // matches /files/hello.jpg and /files/path/to/hello.jpg
23+
<Route path="/:slug?/home"> // matches /[anything]/home like /github/home
2324
```
2425

2526
If a route uses a relative `path`, it builds upon the accumulated `path` of its ancestors. Nested routes may opt-out of this behavior by [using an absolute `path`](RouteConfiguration.md#decoupling-the-ui-from-the-url).

0 commit comments

Comments
 (0)