Hacker News new | ask | show | jobs
by nostrademons 3690 days ago
Yeah, it is quite a lot like React components. Polymer and React actually came out around the same time (early 2013), but Polymer spent forever in development and only recently reached 1.0, so React got a lot of the developer momentum.

If you're doing webcomponents right (i.e. adhering to the Law of Demeter, not handing out references to internal shadow/shady-DOM nodes, defining an API for possible child components), then you naturally get centralized & predictable mutations as well. The methods & child nodes of a top-level component become the API by which events can mutate the page, and then any state changes propagate down to the leaves of the component tree only via well-defined APIs.