Promises
html.resolve(promise: Promise, placeholder: Function, delay = 200): Functionconst promise = asyncApi().then(...);
html`
<div>
${html.resolve(
promise
.then((value) => html`<div>${value}</div>`)
.catch(() => html`<div>Error!</div>`),
html`Loading...`,
)}
</div>
`Last updated
Was this helpful?