-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9650 from lordofthecactus/optional-params
feat: optional params and static segments
- Loading branch information
Showing
5 changed files
with
248 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
"react-router": minor | ||
"@remix-run/router": minor | ||
--- | ||
|
||
Allows optional routes and optional static segments | ||
|
||
**Optional params examples** | ||
|
||
`:lang?/about` will get expanded matched with | ||
|
||
``` | ||
/:lang/about | ||
/about | ||
``` | ||
|
||
`/multistep/:widget1?/widget2?/widget3?` | ||
Will get expanded matched with: | ||
|
||
``` | ||
/multistep | ||
/multistep/:widget1 | ||
/multistep/:widget1/:widget2 | ||
/multistep/:widget1/:widget2/:widget3 | ||
``` | ||
|
||
**optional static segment example** | ||
|
||
`/fr?/about` will get expanded and matched with: | ||
|
||
``` | ||
/about | ||
/fr/about | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,7 @@ | |
- KostiantynPopovych | ||
- KutnerUri | ||
- latin-1 | ||
- lordofthecactus | ||
- liuhanqu | ||
- loun4 | ||
- lqze | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters