vale's User Avatar

@vale

in /html 24 days ago

How I Write Custom Elements with lit-html

How I Write Custom Elements with lit-html – Frontend Masters Blog - Featured Image

How I Write Custom Elements with lit-html – Frontend Masters Blog

frontendmasters.com - faviconfrontendmasters.com
TLDR

This blog post explains how to write custom elements using lit-html, a smaller part of the Lit library, for building web components. The author discusses the benefits of using lit-html over full frameworks like React or Solid, such as its smaller size and the ability to use vanilla JavaScript. The post includes two examples: a stateless render for a status bar component and a stateful render for a Pokémon card component that generates random cards from a specified set.

3Score: 3

0 Comments