Thanks, will keep this in mind. Am I understanding correctly that when B
modifies Y it communicates that change to A through the channel which is in
:shared state?


On 12 April 2014 20:49, Daniel Kersten <[email protected]> wrote:

> Yes, the multiple cursors solution works quite well with the caveat that
> intermediary components must make sure not to discard parts of the cursor
> that lower components need.
>
> Another approach that is working well for me as a temporary solution is to
> store this information in local state and using async channels to notify.
> For example: component A accesses path X through its app state but also
> needs path Y. Component B accesses path Y. When component B modifies Y, it
> also sends the change over an async channel to component A, which stores it
> in its local state.
>
> When David releases the solution, I can replace the local state access
> with the solution and delete the channel.
>
>
> On 12 April 2014 16:13, Dmitry Suzdalev <[email protected]> wrote:
>
>> Understood.
>> Well, after reading through this thread, I see that
>>
>> a) David is working on a solution to this problem, which will deliver
>> both convenience and auto updates
>> b) for now there's an option to pass multiple cursors to the component
>> (there's an example in Om's wiki, on 'Cursors' page)
>> 12 апр. 2014 г. 18:28 пользователь "Daniel Kersten" <[email protected]>
>> написал:
>>
>>  Ah, yes, I meant shared state. The reason I was saying shared and not
>>> app is that app state usually gets "narrowed" the lower in the component
>>> tree you get, so when your low down in the tree and then need to access
>>> something on a completely different branch, how do you do this without
>>> accessing the root app state (which I was storing in :shared so that
>>> components can access it without global knowledge)?
>>>
>>> But perhaps I'm still thinking about it wrong. Would love to hear your
>>> thoughts.
>>>
>>>
>>> On 12 April 2014 14:54, Dmitry Suzdalev <[email protected]> wrote:
>>>
>>>> Ok :) If you are talking about :shared state, than it's true, but for
>>>> the generic case of the global app state, auto updates are supposed to work
>>>> regardless of which part of the state cursor points to AFAIK.
>>>> 12 апр. 2014 г. 17:37 пользователь "Daniel Kersten" <[email protected]>
>>>> написал:
>>>>
>>>>  I think perhaps I was misunderstanding how cursors work. Let me try
>>>>> it out and get back to you then :)
>>>>>
>>>>>
>>>>> On 12 April 2014 12:25, Dmitry Suzdalev <[email protected]> wrote:
>>>>>
>>>>>> Hi Daniel!
>>>>>>
>>>>>> Can you clarify this moment a bit for me:
>>>>>>
>>>>>> On Wednesday, April 9, 2014 2:33:31 PM UTC+4, Daniel Kersten wrote:
>>>>>> > I can pass the entire app state to each component (perhaps trough
>>>>>> shared state) and use transformation functions (similar to what Sean 
>>>>>> Grove
>>>>>> did in his recent slides) to transform the state into a local view for 
>>>>>> each
>>>>>> component. This means each component gets to select exactly what it needs
>>>>>> to access without worrying about what comes before or after it in the
>>>>>> hierarchy, but then you lose the benefit of cursors and automatic
>>>>>> re-rendering when something changes.
>>>>>>
>>>>>> Why do you say that in this case "automatic re-rendering when
>>>>>> something changes" is being lost? Not clear to me, it seems working ok 
>>>>>> for
>>>>>> some of my components which get passed a 'whole' app state... I'm
>>>>>> interested to know if I maybe miss something here :)
>>>>>>
>>>>>> Dmitry.
>>>>>>
>>>>>> --
>>>>>> 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.
>>>>>
>>>>  --
>>>> 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.
>>>
>>  --
>> 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.
>

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