I've just posted a reply to your stack overflow question.

Here's what the code should look like:

def graph-component (reagent/create-class {:reagent-render weight-graph
                                            :component-did-mount 
(draw-weight-graph @lbm @fat-mass "lb")
                                            :display-name "weight-graph"
                                            :component-will-update 
(draw-weight-graph @lbm @fat-mass "lb")}))

(defn weight-graph-container
  []
  (let [weight  (subscribe [:weight-change])
        bodyfat (subscribe [:bodyfat-change])
        weight-amount (reaction (get @weight :amount))
        weight-unit   (reaction (get @weight :unit))
        bf-percentage (reaction (get @bodyfat :percentage))
        lbm           (reaction (lib/lbm @weight-amount @bf-percentage))
        fat-mass      (reaction (- @weight-amount @lbm))]
  (fn []
     [graph-component @lbm @fat-mass "lb"]))) 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to