DEV Community

loading...

Discussion on: lit-html templates from zero to hero

Collapse
usepotatoes profile image
Kus Cámara

Great article!

As a small addition suitable for a comment, it's worth mentioning the until directive that can be used along with promises to render a content until the promise resolves.

const content = fetch('./content.txt').then(r => r.text());

html`${until(content, html`<span>Loading...</span>`)}`
Enter fullscreen mode Exit fullscreen mode

lit-html.polymer-project.org/guide...

Collapse
julcasans profile image
Julio Castillo Anselmi Author

Hi Kus! Thank you for your contribution. Really useful. I want to write a post about directives and I will incluye your comment.

Collapse
chanduprem profile image
Chandu Reddy

Hi Julio!

This is a great article for understanding lit-html...
But was wondering , if u will be releasing some sort of article for directives in lit-html...
The official documentation little hard to grasp...