Closed
Description
Currently moving over to lit straight from polymer 2, we commonly have:
if (!this.prop) {
return html``;
}
return html`some content`;
Is it worth us allowing a null
return type in render
so we can have an empty template?
and inside lit, keep an emptyTemplate
constant which is re-used (if needed)?
so we can have render(): TemplateResult|null
?
edit:
having thought again about this, in reality it is probably less efficient to have null checks in the core. i guess the only solution to this would be to have an EmptyTemplate
constant which is an already new'd up template result.