Control the order of routes #357
-
Is there a way to control the order of the (nested) routes - besides changing the file/dir name? For example I have this structure: And then I want to generate a navigation component based on my routes by using:
This gives me following: My goal is to have logs at the end of the list:
|
Beta Was this translation helpful? Give feedback.
Answered by
posva
Apr 4, 2024
Replies: 1 comment 1 reply
-
You have to define a custom meta property that allows you to sort the routes. You could for example add an |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mszkb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to define a custom meta property that allows you to sort the routes. You could for example add an
order
property and then use it in agetRoutes().sort()