Just after sending this, I stumbled across reagent/flush:

https://github.com/holmsand/reagent/blob/master/src/reagent/core.cljs#L123

But the documentation says:

Note that this may not work in event handlers, since React.js does batching of 
updates there.
Which is a nuisance, as within an event handler is exactly where I’d like to 
call it :-)

Does anyone have any suggestions about what the “may” in that sentence means? 
And, for that matter, what “not work” means? I’m struggling to infer how 
batching interacts with event handling from reading the source.

All I care about, in my particular case, is that the changes to the DOM that 
result from processing the current event have all happened before the next 
event is processed…

Thanks,

--
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

On 27 October 2014 at 22:57:08, Paul Butcher ([email protected]) wrote:

Can anyone give me a pointer to how to temporarily disable batching in Reagent? 
I'd like to ensure that changes to the (real, not virtual) DOM have all 
happened before processing the next event.

Thanks in advance for any pointers.

--
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

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