Replies: 2 comments
-
As a sidenote, can you indicate if the code snippet is the current best way to display a specific sub-route, aka the redirect way? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just to be more clear, and as a consequence of being both a concrete route and also the index:
|
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
-
What is the new or updated feature that you are suggesting?
Currently, the component that serve as the
index
route is eitherPlease select a tab
,users
users
from who we remove its naturalpath
because we set it as the index route.Instead of losing the
path
information, we want to keep it. For example if we display the<Users>
as the index, we want to keep theusers
path.Not only it is logical for this section to keep its path, but the Navlinks that point to it can now keep the
users
path instead of pointing to a empty path.Current Redirect workaround:
Why should this feature be included?
The current workarounds are not satisfying:
Navigate
to the sub-section from theindex
route. But this triggers severals renders, and on the first render, the Navlink that matches the sub-section is not considered as active. Only after the redirect, the navlink is considered as active.index
, but as a result the sub-section loses its name. For example, the sub-sectionusers
now has no path and the Navlink to theusers
sub-section now must point to an empty path `` instead ofusers
.Beta Was this translation helpful? Give feedback.
All reactions