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

Attachment: pgprG1Lg6QckW.pgp
Description: PGP signature

Reply via email to