Closed carrypann closed 2 months ago
I am looking for a way to get sorted routes (for auto generate nav menus), and I find a method getSortedChildren which use path variable to compare, is there any way to get sort routes by custom comparator(e.g using meta.sort)
path
meta.sort
Yeah, you can write that function yourself with router.getRoutes(). BTW here, routes are in a tree
I am looking for a way to get sorted routes (for auto generate nav menus), and I find a method getSortedChildren which use
path
variable to compare, is there any way to get sort routes by custom comparator(e.g usingmeta.sort
)