This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-24
Channels
- # announcements (8)
- # aws (12)
- # babashka (84)
- # beginners (380)
- # calva (56)
- # clj-kondo (52)
- # cljdoc (4)
- # cljs-dev (327)
- # cljsrn (4)
- # clojure (154)
- # clojure-italy (5)
- # clojure-nl (3)
- # clojure-uk (21)
- # clojurescript (52)
- # conjure (133)
- # cursive (64)
- # datomic (33)
- # emacs (22)
- # fulcro (35)
- # graalvm (24)
- # graphql (1)
- # kaocha (1)
- # leiningen (1)
- # off-topic (24)
- # onyx (2)
- # pathom (10)
- # re-frame (3)
- # reagent (3)
- # reitit (3)
- # shadow-cljs (48)
- # spacemacs (12)
- # tools-deps (98)
- # xtdb (7)
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 order