Probably worth looking into again.
I also concur with the author about lit-html. It does one thing and does it really well, easy to understand, and no transpiling needed. Can't recommend it enough for generating dynamic html client side.
Probably worth looking into again.
I also concur with the author about lit-html. It does one thing and does it really well, easy to understand, and no transpiling needed. Can't recommend it enough for generating dynamic html client side.
One issue I have with lit is that it just forces you to turn everything into a web component instead of a carefully deliberated choice.
Honestly I just like the idea of making my own HTML tags and being able to do more with markup.
1. Need to be configurable
2. Are meant to be used many times through an application
3. Are not easily built using regular html
For point one, take a loot at input[type="text"] html5 elements for instance. Placeholders, validation, size, stylability, errors.
Similarly, the video tag. Volume, play pause, size, quality, playback speed, compatible formats, much more.
For point two and three, you could for instance make a Login component, to encapsulate your authentication form into a component, but this is easily achieved using regular html forms. Also, you're most likely only going to use it once or twice.
So what are good examples?
A sparkline component, this is a type of an inline graph.
A markdown or html editor component.
Custom interaction or input components. Consider for instance where you're working on an audio mixing application. A rotatableKnob element is an elementary input here.