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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the new or updated feature that you are suggesting?
Currently, the component that serve as the
indexroute is eitherPlease select a tab,usersusersfrom who we remove its naturalpathbecause we set it as the index route.Instead of losing the
pathinformation, we want to keep it. For example if we display the<Users>as the index, we want to keep theuserspath.Not only it is logical for this section to keep its path, but the Navlinks that point to it can now keep the
userspath instead of pointing to a empty path.Current Redirect workaround:
Why should this feature be included?
The current workarounds are not satisfying:
Navigateto the sub-section from theindexroute. 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-sectionusersnow has no path and the Navlink to theuserssub-section now must point to an empty path `` instead ofusers.Beta Was this translation helpful? Give feedback.
All reactions