It's a good example!  Thank you.

With my current component it seems like a clean way to handle the issues of
passing functions to swap! that may or may not change the state of the atom
and wanting to perform side effects while I have data handy within the
swap! is to just avoid using atoms in this component all together.  Using
core async like you mentioned while making state something that's handed
around in a loop / recur is clean and idiomatic so far.

Thanks again.

On Tue, Jun 9, 2015 at 6:03 AM, Walter van der Laan <
[email protected]> wrote:

> Hi Ryan,
>
> You can use core.async to create a process that has exclusive access to
> the atom that holds all state. This greatly simplifies the structure of the
> client application.
>
> I wrote a tutorial on quiescent that uses this structure:
> https://github.com/wvdlaan/todomvc
>
> The tutorial is a bit old and doesn't show any server interaction but it
> provides an example on how you could structure your application.
>
> It is not difficult to add server interaction. You would have to change
> the process started by todomvc.application/init-updates to work like this;
>
> 1) wait for a transaction to arrive from either the UI or the server
> 2) process the transaction and optionally send a message to the server
> 3) render the UI
> 4) loop
>
> --
> 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.
>

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