Re: [WICG/webcomponents] [declarative-custom-elements] how would SSR work? (#886)

> declarative custom elements we can have HTML payloads that render something up front, and let JS take over later

The concern is completely invalid in the light of Declarative Web Application which assumes functional app without JS whatsoever. Why DCE should have any JS? 

The basic use of custom element is to render template with slots payload. 
More advanced use would be 
* the state sync into own slots/parts 
* state/slots driven UI fulfilment 
* emit event ( bound aside to the data transformation into another dataset/element state )
which also could (and should for DWA) be defined declaratively.

As of SSR in DCE, that matches _server mode_ of web components [hydration proposal](https://github.com/webcomponents-cg/community-protocols/issues/30), no need to invent the wheel.

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

Message ID: <WICG/webcomponents/issues/886/1263048027@github.com>

Received on Friday, 30 September 2022 03:03:49 UTC