My insanity must be worse than I thought because I could swear it was
working earlier!
On 3 April 2015 at 20:45, AndyR andre.r...@gmail.com wrote:
reaction is a macro that expands to evaluating the passed forms (here: 'v')
within a function (make-reaction).
I don't know the internals of
I see - thanks Andy. It is all magic until it clicks :)
Sent from my iPhone
On 3 Apr 2015, at 22:45, AndyR andre.r...@gmail.com wrote:
Yes that's expected. The reaction captures deref's (look at the source of
ratom.cljs and search for capture). So as long as you deref in your
reaction
Here is an example that works and uses a let. I wonder if the reaction inside
the let is making it work...
(defn- render-one [state-key render-key db]
(let [id (- [:add-patient/tree-state state-key]
subscribe
deref
:selected-ids
first
Yes that's expected. The reaction captures deref's (look at the source of
ratom.cljs and search for capture). So as long as you deref in your reaction
block you'll be fine. I'm not an expert on the reagent inner workings so I hope
other correct me if I'm wrong :)
On Friday, April 3, 2015 at