-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcard routing #766
Wildcard routing #766
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d6d1e81:
|
Codecov Report
@@ Coverage Diff @@
## master #766 +/- ##
==========================================
+ Coverage 97.53% 97.59% +0.06%
==========================================
Files 127 127
Lines 7947 7981 +34
Branches 1828 1845 +17
==========================================
+ Hits 7751 7789 +38
+ Misses 196 192 -4
Continue to review full report at Codecov.
|
@maier49 what would the behaviour be here for these two route configurations? Would {
path: "foo/bar/*/qux"
},
{
path: "foo/bar/*"
} |
I think these changes might need to be updated with master also |
0406d98
to
9f3aac8
Compare
@agubler With the implementation here it would just match whichever one is checked first. The wildcard section is explicitly treated as the final section of the route, anything past that is ignored. |
Type: feature
The following has been addressed in the PR:
prettier
as per the readme code style guidelinesDescription:
A proposed implementation of wildcard routing
*
. It will match a route normally up until the asterisk and then match anything after that.score
than for a route param, so that a more specific route will always win.wildcard
route type andwildcardSegments
to theRouteContext
andMatchDetails
. This will include all the segments of the path matched by the asterisk.wildcard
routes so that a change in route segments triggers a route change, even if the same wildcard route is still matched.Resolves #330