Comment

Comment by kjksf

I did a couple of project in Svelte (proof: all the tools on https://onlinetool.io/ are in Svelte).

I understand (I think) what htmx does.

I don't get at all the need to add htmx to Svelte.

It looks like cargo culting because Svelte does what htmx does and more.

htmx has a use case where you mostly generate html e.g. on the backend and then want to sprinkle bits of interactivity by making it easy to replace parts of your HTML with another HTML generated by the server.

Svelte has it's own, superior, way of doing interactivity. The whole point is to make it easy to generate HTML client side. Anything you would want to do with htmx you can do just in Svelte. You've already paid the price (setting up Svelte transpilation toolchain) you might just as well get all the benefits of Svelte.

parent kjksf 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton