Fork me on GitHub
Tom H.09:10:33

@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?

Tom H.09:10:00

by 'view file' I mean src/my-app/component1/view.cljs


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

Tom H.13:10:40

@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


@tomisme dunno of it's a good pattern, but i think i was putting em in core.cljs