On Saturday, March 29, 2014 7:53:48 AM UTC-7, Rob Knight wrote:
> Right now I am not sure why the components don't just update the state using 
> transact!, skipping the whole controller piece, which feels like it would 
> make the components more reusable - they don't need to know about anything 
> outside of the component itself, except for the state cursor.  If the 
> component needs to communicate with the outside world, it can trigger a state 
> change via transact! and can even attach metadata via the tag parameter.  If 
> the application needs to do any post-update stuff after a state change (which 
> Omchaya does), this can be achieved using :tx-listen when setting up the Om 
> root.
> 

One issue I've run into that Sean talks about below and in the slides is that 
explicit transact! calls in the event handlers require your components to know 
something about the structure of your application state.  While you can of 
course pull this out of components by using functions, it seems like a win to 
create a channel and get async benefits almost for free.  It does seem a bit 
cumbersome to be passing channels all the way down though.  

I'm also interested to hear anyone else's thoughts.

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