Skip to content

Optional param with linked prefix directory (w.$workspace) #118

Answered by kiliman
depsimon asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@depsimon
Comment options

Answer selected by depsimon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants