Struggling a bit with how to handle route enum #8826
Unanswered
d-pollard
asked this question in
v5 to v6 Migration
Replies: 1 comment
-
Yes, that's the current way of handling route enums actually. Since the removal of regex based matching, it's just how you need to write paths on different depth levels. Those who used full path enums in diff depth levels of route components with v5 now also have to manually split URL strings by segments and place accordingly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I seem to be struggling a bit with how I should convert my route paths enum to be better utilized in v6
v5 route paths:
So taking
Workspaces
as the example issue, in v5, it would cover cases/workspaces
and/workspaces/1234
however, in v6, this only covers/workspaces/1234
Does this mean I need to add another entry to my enum that's just
WorkspacesBase
that then contains just/workspaces
and then in addition, when creating the route, I need to use<Route path={RoutePaths.WorkspacesBase + '*'} />
?Is there maybe a more concise way of handling this so I don't need to maintain multiple entries of
workspaces
route?Any thoughts are greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions