om

Please ask the channel first, not @dnolen directly!
ajs 2017-07-08T05:18:47.173154Z

What is the last version of Om now/previous I could upgrade a legacy code base to? Looks like it is the same repo as Om Next, is that right?

johnny.martin 2017-07-08T15:40:55.586228Z

I thought I remembered seeing fixes to get SVG working. But sadly <rect/> renders without any attributes. I must be missing something. I have a one line modification to https://github.com/omcljs/om/wiki/Quick-Start-%28om.next%29

(dom/div nil "Hello, world!")
changed to
(dom/svg {:width "100%" :height "100%"}
                   (dom/rect {:width 100 :height 66
                              :x 50 :y 50
                              :fill "blue"}))
My project.clj uses versions recommended by the quick start tutorial,
;  :dependencies [[org.clojure/clojure "1.8.0"]
;                 [org.clojure/clojurescript "1.9.671"]
;                 [org.omcljs/om "1.0.0-beta1"]
;                 [figwheel-sidecar "0.5.4-6"]])

  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/clojurescript "1.7.170"]
                 [org.omcljs/om "1.0.0-alpha34"]
                 [figwheel-sidecar "0.5.0-SNAPSHOT" :scope "test"]])
When I tried with more recent versions (commented out), React.js responded with a hint,
Warning: Unknown props `meta`, `cnt`, `arr`, `__hash`, `cljs$lang$protocol_mask$partition0$`, `cljs$lang$protocol_mask$partition1$` on &lt;svg&gt; tag. Remove these props from the element. For details, see <https://fb.me/react-unknown-prop> in svg

the-kenny 2017-07-08T16:11:25.753210Z

@johnny.martin: you're using {...} instead of #js{...} to set the props on your &lt;rect/&gt;

the-kenny 2017-07-08T16:12:09.758429Z

@johnny.martin:`#js{...}` creates a Javascript object, {...} creates a ClojureScript map

johnny.martin 2017-07-08T16:16:18.785411Z

Arrg., of course.... Thank you!

the-kenny 2017-07-08T16:18:12.795838Z

@johnny.martin For later, I recommend sablono (https://github.com/r0man/sablono). It gets you the known hiccup syntax which I find nicer to read.

matan 2017-07-09T19:26:58.231588Z

the-kenny: I just saw this comment, doesn't om/om.next come with something like this itself?

the-kenny 2017-07-09T21:36:23.856143Z

It does? Haven't seen it.

2017-07-08T20:47:17.151044Z

Hey guys I have a question about query in om next. Specifically, can I design a query such that I indicate that I want the received props to be a vector of maps instead of a map ? For instance, looking at the “Components, Identity & Normalization” from the wiki, the ListView component doesn’t have a query of it’s own. I quess my question is, could I make similar components that expose a query indicating the list to display ? If possible, what would it look like ?