Hey everyone, is there is simple way to break a circular dependency between handlers and routers e.g. handler -> match-by-name -> ring/router -> handler?
In a handler that returns hiccup, Iād like to use match-by-name to retrieve a url path without adding a circular dependency
@occamin the ring-router is injected into request:
(defn handler [request]
(let [router (:reitit.ring/router request)]
...))
ah perfect
that certainly simplifies things
(you can disable the injection using router options, has a tiny runtime perf penalty of assoc
;))
many thanks
and in general for all the great work you guys are doing at metosin
loving malli as well