Fork me on GitHub
#devcards
<
2016-01-14
>
okal07:01:26

Should it be possible, within the figwheel REPL, to swap the value of an atom and have an Om component reflect this in the UI?

meow08:01:30

@okal: is that not working for you

okal11:01:42

@meow Doesn’t seem to be, no. Might be doing something wrong though. https://github.com/okal/vega-viewer/blob/master/src/vega_viewer/core.cljs

okal11:01:00

It’s possible that my component is wrongly structured, though.

okal11:01:08

If you call swap on it, the value is reflected when you print out the atom. But it doesn’t update in the UI. But again, it’s quite possible that I’m missing something obvious.

anmonteiro11:01:55

@okal: use om-root or defcard-om instead of defcard + om/build

okal11:01:21

Let me give that a shot. Thank you simple_smile

okal12:01:17

@anmonteiro Works like a charm. Thank you.

gerrit19:01:38

Hi, just wanted to give the quick trial a go, but I am getting this on lein figwheel:

Retrieving figwheel-sidecar/figwheel-sidecar/0.5.0-3/figwheel-sidecar-0.5.0-3.jar from clojars
clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate cljs/analyzer__init.class or cljs/analyzer.clj on classpath: , compiling:(figwheel_sidecar/utils.clj:1:1)

gerrit19:01:57

shouldn't that analyzer namespace come bundled with clojurescript?

bhauman22:01:06

@gerrit: lein clean, use leiningen 2.5.3. This happens when you have competing versions of clojurescript.