Re:PrimateJS: Svelte and Htmx Quick Start
by 8n4vidtmkvmk on Wednesday April 12, 2023 @12:56AM
(#35535180)
so then you send HTML to the client, but then you still have to 'hydrate' it to make it interactive. and now you've reinvented React SSR.
Re:PrimateJS: Svelte and Htmx Quick Start
by jonomacd on Wednesday April 12, 2023 @03:09AM
(#35536008)
You don't have to hydrate the html as events get triggered from "hx-" attributes on the elements.
Re:PrimateJS: Svelte and Htmx Quick Start
by 8n4vidtmkvmk on Wednesday April 12, 2023 @09:13PM
(#35549525)
So where are the event listeners then? On the body tag, and they bubble up and then examine the hx attribute? Is that how it works?
Also, even if serve returns HTML as list of files instead of JSON, HTML can be seen as a flexible data format in itself that has few added advantages.
JSON is superfluous when the only consumer is the browser based UI and no third party is going to have that response ever.