devcards

Devcards aims to provide a visual REPL experience for ClojureScript https://github.com/bhauman/devcards
okal 2016-01-14T07:10:26.000218Z

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?

meow 2016-01-14T08:34:30.000219Z

@okal: is that not working for you

okal 2016-01-14T11:18:42.000221Z

@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

okal 2016-01-14T11:19:00.000223Z

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

okal 2016-01-14T11:20:08.000224Z

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.

meow 2016-01-14T11:20:43.000225Z

yes

anmonteiro 2016-01-14T11:22:55.000226Z

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

1✅
okal 2016-01-14T11:23:21.000227Z

Let me give that a shot. Thank you :simple_smile:

anmonteiro 2016-01-14T11:23:52.000228Z

see https://github.com/bhauman/devcards/blob/master/example_src/devdemos/om.cljs for examples

okal 2016-01-14T12:26:17.000231Z

@anmonteiro Works like a charm. Thank you.

1😇1🤘
gerrit 2016-01-14T19:17:38.000235Z

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)

gerrit 2016-01-14T19:21:57.000236Z

shouldn't that analyzer namespace come bundled with clojurescript?

bhauman 2016-01-14T22:04:06.000238Z

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

1👍1✅