-
I'm trying to setup a route that would allow us to handle several cases. I initially wanted to use Basically what I want is something like: It should resolve the following:
Ideally it should not accept:
I have been trying a few options, but I'm not even sure that we can have multiple segments in parenthesis. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Is there a default workspace and project if none is specified? I'm not a big fan of multiple URLs referring to the same concept. I think optional params really confuse things, especially since RR doesn't do tree-based matching (that is, it doesn't match routes at each URL segment but matches the URL against the entire route config). See remix-run/remix#9227 (comment) Anyway, I would first create the explicit route, then create additional routes that redirect to the explicit route. So start with explicit route Then, let's say the default workspace/project is For Then create a route The nice thing about this is that you can never have a match on Anyway, even if you did want to use optional params, RR only allows params to be a single segment (the part between the |
Beta Was this translation helpful? Give feedback.
Is there a default workspace and project if none is specified?
I'm not a big fan of multiple URLs referring to the same concept. I think optional params really confuse things, especially since RR doesn't do tree-based matching (that is, it doesn't match routes at each URL segment but matches the URL against the entire route config).
See remix-run/remix#9227 (comment)
Anyway, I would first create the explicit route, then create additional routes that redirect to the explicit route.
So start with explicit route
_app.w.$workspace.p.$project+/issues.tsx
Then, let's say the default workspace/project is
all
.For
/issues
I would redirect to/w/all/p/all/issues
Then create a route
_app.w.$workspa…