I see that the reitit frontend router accepts multiple controllers per route, but I can't find an example that uses multiple controllers (per route). Is this how one would go about it?
[{:start start-fn :stop stop-fn}
{:start start-fn-2 :stop stop-fn-2}]
If so, what's the order of operations? Does start-fn always begin before start-fn-2? Does it work similarly to nested-controllers?I generally do something like
(def require-auth-controller {:start (fn [] (require-auth))})
(def load-data-controller {:start (fn [] (load-data]))})
and then do [require-auth-controller load-data-controller]
. Based on putting in some println statements, it seems that the start
functions run in the order they are given (so require-auth-controller
followed by load-data-controller
in the example), and I think I remember reading that the :stop
functions run in the reverse orderthank ye!