reitit

lwhorton 2024-05-08T16:50:08.342799Z

i'm doing some 'stack like' navigation on a webapp that's meant exclusively for mobile browser usage. i think i have a good pattern figured out for integrating with native browser history. i'm curious if reitit provides some introspection functions like (child? router route-a route-b) or parent? / sibling?, etc? i looked through the codebase for a bit but didn't find anything obvious that i could leverage. i can probably implement them myself with normal graph traversals and core.walk or zippers... but why reinvent the wheel

valerauko 2024-05-09T08:30:38.641979Z

I don't know if reitit does it natively, but if not you could possibly implement it using keyword hierarchies without any graph magicks. (especially since I assume you name your routes on the frontend) https://clojure.org/reference/multimethods

💡 1