3 ms·
Then you need to send lit-html over to the client also. This would be a great alternative if one doesn't already use Babel, but what's the selling point otherwi
by malydok 8y ago
Then you need to send lit-html over to the client also. This would be a great alternative if one doesn't already use Babel, but what's the selling point otherwise? Is there an easy way to combine lit-html's render with the HyperApp one?
- spankalee 8y agoIMO, the problem of composing renderers is solved at the component level. Each component should be able to freely choose its rendering library and control its own encapsulated DOM without interfering with other components, or leaking it's choice of template library to the outside. Web Components and Shadow DOM make this possible. You can mix and match components that use lit-html, Polymer, Preact, etc., and mostly likely HyperApp.
- simplify 8y agoBut mixing and matching causes your page to bloat due to needing to download all the different libraries, right?
- seabrookmx 8y agoYup. I think within your own components it makes sense to stick with a single library setup for this reason, but atleast if you want to use a third-party component you don't have to rule out components that use different rendering machinery. You just have to weigh that additional download penalty.
- iteriteratedone 8y agoWell this level should be abstracted to a common interface , why is the component choosing ??? It can be a config detail like what storage engine to use Second question ... why use,different rendering engines?
- Vinnl 8y agoWell... At this point you can't e.g. include two web components when one of them uses Polymer 1 and one of them uses Polymer 2, for example...
- spankalee 8y agoThat's only because Polymer 1 and 2 installed themselves on the `window.Polymer` global, so they would conflict, and Polymer 1 used the old Web Components v0 spec. Polymer 3.0 doesn't write to any globals and can intermix with LitElement, other Web Components libraries, and future Polymer 4.0 and beyond.
- Vinnl 8y agoThat's a great step forward :) And how about using two Web Components that depend on a third component? For example, what if I'm using two third-party components that both depend on LitElement, but on different versions of LitElement? Will those still conflict?