This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-27
Channels
- # admin-announcements (42)
- # aws (15)
- # beginners (8)
- # boot (102)
- # cider (7)
- # clojure (141)
- # clojure-italy (10)
- # clojure-japan (4)
- # clojure-russia (26)
- # clojure-seattle (1)
- # clojurescript (239)
- # core-matrix (13)
- # cursive (19)
- # datascript (54)
- # datomic (21)
- # editors (2)
- # events (1)
- # hoplon (125)
- # instaparse (10)
- # jobs (3)
- # ldnclj (13)
- # ldnproclodo (1)
- # om (1)
- # onyx (2)
- # rdf (206)
- # re-frame (30)
- # reagent (7)
- # yada (4)
I’ve just started learning cljs / reagent and have hacked a simple app together, but don’t think I understand how reset! atoms ripple changes to referencing components. I have some code at https://gist.github.com/paulspencerwilliams/0b9a9d00869ec9107d4a but when the button.onclick event triggers, it reset!s the atom, changing data, but the Highchart isn’t updated. Am I right in thinking this should affect the chart? Is it how I’m binding to chart-config in home-did-mount?
Forgive me, I dont have time to take a close look at this, but consider using swap! Instead of reset! And :component-did-update instead of :component-did-mount
@gadfly361 cheers for advise, had tried the more typical swap which hadn't worked but :component-did-update sounds like a good solution. Thank you.
Also, I knocked the code together quickly to play; I should have refactured before posting to make and if easier to read.