Re: [WICG/webcomponents] [templates] A declarative JavaScript templating API (Issue #1069)

@sorvell 

> it would necessarily involve a compiler and that compiler would be responsible for doing something like wrapping all the signal access in functions, or whatever is needed to ensure the update can be fine-grained.

yup -- this would have to be a manual step with the proposed html-template-literal function (else you toss fine-grained reactivity and re-generate the whole template each signal-change)

> If so, would you agree the downsides are something like: (1) requires a build step, (2) depends on a robust potentially complex build compiler?

1) nay -- or rather, interpretation of the string-template can happen at runtime, much like template-literal functions
2) nay, see above

>  It's a feature that can easily seem trivial in isolation: how hard is ()=>?

Having a way for template-literals to implicitly imply `() => ` could work, but I think would be a surprise, since `${}` already has semantic meaning. -- and then how would you ever do anything statically? (like today's default)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1069#issuecomment-2302371493
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1069/2302371493@github.com>

Received on Wednesday, 21 August 2024 15:26:43 UTC