This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-24
Channels
- # announcements (22)
- # babashka (33)
- # babashka-sci-dev (161)
- # beginners (25)
- # calva (57)
- # cider (6)
- # clara (6)
- # clerk (14)
- # clj-kondo (24)
- # clojars (10)
- # clojure (65)
- # clojure-austin (1)
- # clojure-conj (2)
- # clojure-europe (23)
- # clojure-miami (3)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-uk (3)
- # clojurescript (28)
- # cursive (24)
- # datomic (136)
- # emacs (38)
- # graalvm (29)
- # graphql (3)
- # introduce-yourself (8)
- # jackdaw (4)
- # jobs-discuss (9)
- # malli (5)
- # nbb (36)
- # off-topic (11)
- # pathom (58)
- # polylith (2)
- # practicalli (1)
- # re-frame (5)
- # reagent (11)
- # releases (1)
- # remote-jobs (8)
- # sci (15)
- # shadow-cljs (31)
- # slack-help (2)
- # spacemacs (11)
- # sql (7)
- # tools-build (9)
This may be just a newbie CLJS question... I'm curious about how re-frame registers events. I'm doing my first re-frame app, and I used the lein app booter. I tried adding an additional file registering events, separating db
events from fx
events (rather than having them all munged up in events.cljs
), and I required it in core.cjs
, but my event handlers aren't registering. I tried searching the docs to understand how re-frame loads the subs and events, but I couldn't find anything. Can someone here point me in the right direction, or give me an idea of how this works?
Thanks for your reply @U2FRKM4TW. I guess I'll have to research why the functions aren't being called, then.
You need to require the namespace where the functions (reg-event … etc) are. You can do it in the applications main namespace.
I wondered about that. I didn't see any require for events.cljs
or subs.cljs
in my core.cljs
, so I was wondering if there was some configuration magic going on. Anyway, I'll give that a try. Thanks @U6N4HSMFW!