Le samedi 25 janvier 2014 15:57:16 UTC+1, Moritz Ulrich a écrit :
> Jonas Enlund writes:
> 
> > On Saturday, January 25, 2014 9:49:56 AM UTC+2, David Nolen wrote:
> >> Nice. I do consider the non-modularity of `update-contacts!` here to be 
> >> one of the big things I try to address in Om. The Reagent 
> >> `update-contacts!` knows too much. In Om, it doesn't matter at all where 
> >> :contacts lives in the app state, the Om contacts-view can still update it.
> >
> > So if I understand correctly the 'app' arg in (defn contacts-view [app 
> > owner] ...) doesn't have to be the root of the app-state atom?
> 
> You understand correctly. Om implements a cursor data-structure which
> allows you to pass a 'subset' (for example (:contacts state) of the
> components. om/update! will update as expected (it will just see the
> :contacts part of the state).

If I may, Reagent has cursors too: 
https://github.com/reagent-project/reagent-cursor, that allow exactly that.

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