Looking at the basic Om tutorial, it suggests creating a channel and passing 
that into the components that need to communicate as part of their initial 
state:

https://github.com/swannodette/om/wiki/Basic-Tutorial#intercomponent-communication

Sean

On Mar 29, 2014, at 4:15 PM, Daniel Bell <[email protected]> wrote:
> Perhaps you can help me understand.
> 
> What I should have said is that when a component needs to be able to 
> communicate with other components, or effect changes to state that's outside 
> of (or hidden within) the cursor provided to a component---then the path to 
> that state needs to live somewhere.  The ultra-naive way to do it would be 
> 
> (defn click-button [app owner]
> (om/component
>  (dom/input #js {:type "button" :onClick #(transact! app :clicked true)}))
> 
> It is certainly possible to inject the path, but I haven't hit upon an 
> orderly way of doing that yet (though I'm looking at sgrove's path/transform 
> solution). 
> 
> Am I missing something obvious?

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to