This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-08
Channels
- # admin-announcements (3)
- # alda (2)
- # beginners (66)
- # boot (54)
- # cider (21)
- # clara (1)
- # cljsfiddle (32)
- # cljsrn (9)
- # clojars (4)
- # clojure (164)
- # clojure-dusseldorf (4)
- # clojure-japan (2)
- # clojure-norway (1)
- # clojure-russia (76)
- # clojure-sg (8)
- # clojurescript (19)
- # core-async (1)
- # core-typed (1)
- # cursive (6)
- # datomic (1)
- # editors (48)
- # hoplon (20)
- # immutant (2)
- # jobs-discuss (6)
- # ldnclj (1)
- # om (82)
- # onyx (6)
- # parinfer (11)
- # proton (2)
- # re-frame (113)
- # reagent (17)
- # testing (11)
- # untangled (11)
- # vim (4)
- # yada (38)
Looks like React v15.0 RC is out. https://facebook.github.io/react/blog/2016/03/07/react-v15-rc1.html
hello, using highcharts with reagent. The example works fine. However, I want to generate a new graph when the data changes.
How can you accomplish that with reagent?
(defn chart-render []
[:div])
(defn chart-did-mount [topic data this]
(.highcharts (js/$ (reagent/dom-node this))
(clj->js (chart-config topic data))))
(defn chart [topic data]
(reagent/create-class {:reagent-render chart-render
:component-did-mount (partial chart-did-mount topic data)}))
[:#chart] (content (if chart-data
[highcharts/chart topic chart-data]
[:h2 "No matching data found!"]))
since its did-mount, this is only called once. I did try using component-did-update
but then the chart redraws whenever something happens on the page (which is not what I want).
@martintrojer: https://github.com/Day8/re-frame/wiki/Using-Stateful-JS-Components
Be sure to look at this derivative work too (referenced at the end of that Wiki page):
http://zachcp.org/blog/2015/reagent-d3/
He does similar work via reagent/argv
(explained in his blog post).
thanks again, this pattern works perfectly in my case.
@mmeix the release candidtate for React v15.0 is only 2 days old. I'm not sure anyone has looked at it. In fact, support for React for v0.14 is still alpha. So no good answers yet
@mikethompson of course, silly me
lack of support for v0.14 is hitting me. is there a milestone to get us there? would like to help
Test your apps with Reagent 0.6.0-alpha (React v0.14) and report how you go here: https://github.com/reagent-project/reagent/issues/212 I'm particularly keen to see how re-frame apps go.
anyone using masked inputs? how you doing?