Fork me on GitHub
Joe Douglas15:10:12

Hi, I've been playing around with reg-sub-raw, and something in this has me scratching my head: where is the reaction function coming from? I can see a macro of that name in the reagent docs, but it's a clojure thing? I've put the snippet below

(defn some-fn
  [app-db event]    ;; app-db is not a value, it is a reagent/atom
  (reaction (get-in @app-db [:some :path])))  ;; returns a reaction


reaction is indeed a macro. Macros are expanded during CLJS compilation.

Joe Douglas15:10:57

Ahhh ok, thanks!