This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-15
Channels
- # admin-announcements (3)
- # aws (1)
- # beginners (1)
- # boot (73)
- # cider (1)
- # clojure (146)
- # clojure-japan (4)
- # clojure-nl (3)
- # clojure-russia (90)
- # clojurescript (72)
- # community-development (17)
- # core-async (10)
- # cursive (60)
- # datomic (15)
- # devcards (7)
- # emacs (5)
- # events (5)
- # hoplon (3)
- # instaparse (3)
- # ldnclj (48)
- # leiningen (5)
- # off-topic (27)
- # om (120)
- # onyx (31)
- # re-frame (7)
- # reagent (7)
- # ring-swagger (17)
- # yada (3)
@gadfly361: I'm starting to implement a similar pattern. In which file do you require files like src/my-app/component1/handlers.cljs
? In the view file?
its probably the easiest way, i thought about an alternative ns macro, or doing something clever with iterating directories and requiring them, but then you're liking to break tooling like figwheel (figuring out dependency chain)
the other alternative is a root handlers.clj which requires only functions from various components and does the registration at the top level
i.e. src/my-app/component1/handlers has the function for handling but register-handler is only in handlers.clj
@nowprovision actually I really like your last idea. My app is small enough that a root handlers.cljs could contain all the (register-handler)
calls but I want to start splitting up some logic