- From: Ryosuke Niwa <notifications@github.com>
- Date: Thu, 02 Jun 2016 19:25:08 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc:
- Message-ID: <w3c/webcomponents/issues/78/223475434@github.com>
> This is not about "inter-component communication" (?). Only events are used for that in a "data down, actions up" paradigm. This is about either a deep or recursive API being necessary for the framework layer to manage updates. It might be beneficial to read more around things like Redux + React (but as aforementioned, it's not strictly just data, see for example Om Next (30:36 onwards) where they maintain a live index of all instances on the page). > > The `composed` event is very relevant here: it's the symmetrical counterpart to this feature. Specifically, it enables dispatching an event which may pass through many layers all of whom do not need to explicitly re-emit the event. It's "upward piercing". Oh I see. This is exactly one weakness I see with the current web components as well. But I don't think exposing shadow roots is the right solution for this. What we need is an event-like system that propagates things downwards instead of upwards. e.g. `dispatchEventInSubtree` which would fire an event on all elements under a given element. But I don't think using an event is the right construct here. I think a better approach would be adding a new custom element callback which gets some sort of a message, and that can then pass it down to other custom elements within its shadow tree with some sort of default delegation mechanism. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/78#issuecomment-223475434
Received on Friday, 3 June 2016 02:25:38 UTC