-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
V3: regexparam
-based route patterns
#337
Conversation
size-limit report 📦
|
@jeetiss Hi, here are the things I need your help with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the cache and almost all tests work now, could you fix last one in wouter-preact
package
<Route path="/:anything*">Nothing was found!</Route> |
(as I understand named wildcard params doesn't supported by parser)
i think it is better to disable tests for types now (or merge with red ci) and i going to try to fix them in separate PR
This test does work for me, how do I clean the cache? |
I figured it out! The test has been fixed. |
Apparently, there was no actual task for linting types on CI 😄 |
Removes default matcher and replaces it with
regexparam
Breaking changes
Matching
"/:user+"
"/:user*"
"/*?"
(yet! see Optional wildcards lukeed/regexparam#25)"/users/:id-:name"
doesn't work. But, this is supported bypath-to-regexp
"/home/"
and"/home"
, but I suppose it is a better DXmatcher
prop. Instead, there is aparser
prop that allows to customize pattern parsing. Now it is easier to integrate withpath-to-regexp
Base paths
~/home
). Why? Because when you are inside a nested context, the content won't be rendered anyway and it requires additional work to support it inregexparam
Modules
wouter/matcher
has been removedTODO
useRoute
Further improvements
useRoute
should not work with falsey patterns, whileRoute
should always render when pattern isn't provided