I see, sorry I didn't read your previous message more carefully.

>From a test (using Om 0.6.2) I just tried it seems like calling
set-state! will trigger two renders in and of itself; calling transact!
multiple times will not do so.  I suspect this is either a bug or
something I'm doing incorrectly in my code, but I'll have to ask David
what he thinks:

https://gist.github.com/ddellacosta/432806ff921377510187

However, calling set-state! and transact! together do not provoke extra
re-renders; I haven't dug into the code yet but I suspect any updates
within the same Om/React cycle shouldn't (other than the weirdness with
set-state! I saw) provoke any more than a single re-render.

DD

(2014/05/06 19:12), Roger Gilliar wrote:
> The question is if I can combine e.g. a transact! and update-state! call into 
> an atomic operation. 
> 
> Something like:
> 
> (do-transact
>  (transact! data #(assoc % :foo "foo" :bar "bar")) 
>  (update-state! owner #(assoc % :foo "foo" :bar "bar"))) 
> 

-- 
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