- From: Matthew Phillips <notifications@github.com>
- Date: Wed, 19 Jul 2023 15:47:13 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 19 July 2023 22:47:18 UTC
It's more than just reusing the template, you need to reuse the logic used to turn the template into HTML. Otherwise you are going to repeat the logic. Client templates are a subset of the same server templates. For example say you have a template of: ```html <div>{a} <span>{b}</span> {c}</div> ``` Where only `b` changes in the client. Because it's in the same template you need to use the same logic to generic `a` and `c` as well. This is, of course, wasteful, as these values do not change. It also forces you to write the same logic twice, in both languages. Since no one wants to write the same code twice, in practice almost no one actually does this. Instead they choose JS and run the same code in both environments. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1009#issuecomment-1642862575 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1009/1642862575@github.com>
Received on Wednesday, 19 July 2023 22:47:18 UTC