I'm really impressed with the visual design, and curious about what's being used to generate the CSS.
I'm also wondering, are there any difficulties that arise when working with canvas and svg using just Om, or in plain React?
I'm also wondering, are there any difficulties that arise when working with canvas and svg using just Om, or in plain React?
I can't say much about canvas, but using svg with React is a bit of a hassle. There isn't built-in support for every svg tag and attribute, so we have to maintain our own fork: https://github.com/precursorapp/react
Once you add support for the tags, though, it's no different than working with any other html in React. I think we'll see React start to eat into d3's market-share pretty soon.
(defcomponent circle-view [data]
(render [_]
(let [size (get-in data [:circles :size])]
(html [:div.circle
[:svg {:height size
:width size}
[:circle {:cx (/ size 2)
:cy (/ size 2)
:fill "yellow"
:r (/ size 2)
:stroke "green"
:stroke-width 4}]]]))))
And it seemed to all work fine? (Using sablono obviously)Some of the things we had to add for Precursor were clipPath, foreginObject, mask, patternTransform, marker, and vector-effect.