Jan Miksovsky is an designer/developer expert at component.kitchen on Web Components. Only interested in coding approaches that can be shared with other people. With emphasis on stylin and reuse. page
Many web developers come to reuse through design. We look at his work for clarity on how to decompose to implement ES6 'strict mode' page
Component.kitchen rewrote its backend server to rip out a popular templating language and replaced it with plain JavaScript functions. After language improvements in ES2015 page
On implementing web component mixins as functions page
- "ES6 template strings let us easily embed HTML directly inside of JavaScript files, instead of putting JavaScript code inside of HTML files as we did with HTML Imports."
- "Both packaging formats can work, but given the need for JavaScript modules anyway, it seems worthwhile for us to see what we can build with modules alone.
- Stencil.js was introduced recently at the 2017 Polymer Summit. A look at Stencil.js page
- Service Workers have indeterminate lifetimes and I think the only way to wake them up is for them to receive a push notification. page
Since the term "framework" can provoke strong negative reactions, authors of such code may actually care whether their code is labeled a framework or not. page
- Google, for example, seems to take great pains to avoid describing its own Polymer project as a framework. They call it a "library", which sounds perhaps smaller or less threatening.
- Polymer easily meets all of the above framework criteria. For example, Polymer's internal asynchronous task-scheduling infrastructure establishes the flow of control in a Polymer application, determining when to invoke component lifecycle callbacks and property observers.
- Polymer has begun to gain increasing recognition in the market, with special attention paid to its structured design process, allowing for an interoperable "lego block" structure page
.
See Elix ES6 Mixins
After a little more inspection, there's still an awful lot of code. Wonder if the reactive part is worth the effort. Might be that what I really want is much simpler. The Power of Web Components. article
Shim for custom elements in browsers that aren't quite there yet https://github.com/webcomponents/custom-elements Found this article helpful... leaving it here for now. https://blog.sessionstack.com/how-javascript-works-under-the-hood-of-custom-elements-best-practices-on-building-reusable-e118e888de0c
Hybrid.js also eschews class-based inheritance when creating ES6 components. https://hybrids.js.org/ On closer look at the source, this is still not what I'm looking for.
The source code for polymer's `lit-element` looks interesting. github
Also interested in the example of `lit-element` hosted at glitch: glitch