On Thu, Jun 4, 2015 at 10:59 AM, Leon Grapenthin <[email protected]>
wrote:
> Thanks for replying so quickly.
>
> Ad 1. What do you mean by "full re-render"? I'd assume that render or
> render-state is called on every component? But I could verify today that
> seems not to be the case.
>
That's what I mean we re-render from the root component. React will
determine what work actually needs to be done. render and render-state are
mutually exclusive and accomplish the same thing.
> Ad 3.
>
> a:
> (om/update! cursor [:foo :a] 32)
> (om/update! cursor [:foo :b] 32)
> (om/update! cursor [:foo :c] 32)
> ;...
>
> b:
> (om/transact! cursor :foo #(merge % {:a 32 :b 32 :c 32 ;...
> }))
It doesn't matter. Nothing happens here except updating the application
state and scheduling a render. Currently we just re-render from the root.
But transact! supplies us enough information to do more which why it was
always recommend over swap!
However with Om Next underway such optimizations will likely not land in
the older version of Om. And there will probably be a migration path to
allow people to leverage the optimizations in the next version with older
style components.
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.