On Thu, Mar 6, 2014 at 4:48 PM, Dan Holmsand <[email protected]> wrote:

> For example, if you have:
>
> [:div
>   [my-component
>     [:span "foo"]]]
>
> my-component is passed the span thing as a normal vector, and is free to
> do whatever it likes with it (replace every :span with :blink, translate
> "foo" to Swedish, animate it, store it somewhere else for later use, etc).
> If the UI definition is opaque (as in plain vanilla React), there's much
> less you can actually do with it (basically either render all the children,
> or don't).
>

I'd argue that this still a DOM-centric point of view that emphasizes
manipulating a DOM representation even if the manipulation is incredibly
expressive. In Om data-centrism occurs immediately with the application
state and all interesting manipulation of the UI happens on the *original*
data - React DOM and Om components are just pluggable details. Your example
of replacing "foo" is actually illustrative of the fundamental difference -
you've settled on a Hiccup representation forcing all subsequent
transformations to necessarily be tree walks. In Om no such data
representation constraint has been imposed.

Again this all boils down to tradeoffs and which parts of the respective
systems are simple / easy.

David

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to