Commit be3514c
committed
Use exact routes to pages
By default, react route matches a URI (let's say) greedy which means the
following route:
<Route path="/about" ... />
will match the following URIs:
/about
/about/
/about/foo
/about/foo/bar
Well, that's not what would we expect. That's why we want to set 'exact'
option on routes, so only two cases would be allows for the example
above:
/about
/about/
Any other options will end up with 404 Not Found.1 parent f7d52c8 commit be3514c
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments