> I would also triple check that the order in which events are dispatched are 
> the order in which they are executed.

I was worried about it, too, but re-frame docs explain it quite clear.

https://github.com/Day8/re-frame#talking-to-a-server

> dispatch will cause a handler function to be called. But the process is 
> async. The call is queued.
> if you (further) dispatch in a handler, then that will be async too. The 
> associated handler is queued for later processing. Why? Partially because 
> handlers are given a snapshot of the app-db and can't be nested.

Problems can show up later in case I'd be doing some async operations like 
saving to local storage or making HTTP requests – I wouldn't be able to 
guarantee the order in which they get queued.

So yeah, the pureness of the second approach has many benefits and makes the 
code more confident.

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