The Case for Custom Elements: Part 1
Rob Dodson

The first problem I see lacking in Custom Elements is the data flow between components. Since you can only provide string attributes to custom elements, how do you pass and share complex data structures between multiple nested custom elements? Putting everything in global scope sounds like a terrible idea, and if we are talking about data binding then you either have to introduce something like Polymer (with a lot of extra buy-in) or use a framework with its own component system that comes with baked-in data flow mechanism.

In addition, the point about “no framework lock-in” is nice for the end user, however at the cost of a much worse development experience for the component authors — building complex interface components with vanilla JavaScript is not very fun nor maintainable. And once you decide to start sharing common logic / utils across multiple custom elements you author, it becomes not much different from using a framework (arguably even worse). Overall it’s great for distributing one-off no dependency widgets, but in my opinion Custom Elements alone doesn’t suffice as a scalable solution in real world use cases.

Show your support

Clapping shows how much you appreciated Evan You’s story.