On Jan 13, 2014, at 10:46 AM, Dan Holmsand <holms...@gmail.com> wrote:
> I'm not entirely convinced yet that implementing preemptive threads and refs > on top of them is a great fit for Cloact's minimalistic goal :) No! That’s not quite what I meant, even though it’s what I said! I’m familiar with Clojure but new to ClojureScript and have just (re)realized that refs are not implemented. So, yes, my suggestion is even more ambitious than I thought it was :-) I’m running in my browser, right now, a function that updates the render state and React is given the opportunity to redraw before the function continues (i.e. it re-renders right after the swap!). This is certainly within the rules. If you have multiple atoms that need to be updated then you’ll potentially see React re-render between each atom update… i.e. there will be React renders where the atom values are uncoordinated/inconsistent (possibly doing silly stuff on the screen, momentarily at least). I can imagine some very crude techniques to prevent this, do you know any good ones (beside putting all state in one atom (which, personally, I had been planning to do anyway))? Cheers, Bob > > Thanks, > > /dan > > On 13 jan 2014, at 15:16, Bob Hutchison <hutch-li...@recursive.ca> wrote: > >> >> On Jan 13, 2014, at 7:36 AM, Dan Holmsand <holms...@gmail.com> wrote: >> >>> And in general, it probably will be easier to make sure that your data is >>> consistent if you keep state that belongs together, together... >>> >>> /dan >> >> Or you could add refs to Cloact’s repertoire :-) >> >> BTW, Cloact is looking quite nice. I’m going to start converting one of my >> more complex React projects to Cloact today. >> >> Cheers, >> Bob >> >> -- >> Note that posts from new members are moderated - please be patient with your >> first post. >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "ClojureScript" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/clojurescript/vdVW1eeLiag/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> clojurescript+unsubscr...@googlegroups.com. >> To post to this group, send email to clojurescript@googlegroups.com. >> Visit this group at http://groups.google.com/group/clojurescript. > > -- > 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 clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.