4 ms·
The idea is that the js is used to implement the functionality that the author believes should be built-in. In theory you could have a browser plugin/extension
by noidexe 4y ago
The idea is that the js is used to implement the functionality that the author believes should be built-in.
In theory you could have a browser plugin/extension for handling htmx and it would work across every site using htmx.
You app-specific "code" is all declarative, just extra properties in your html tags.
With most frontend frameworks, even if the browser came with built in support for Vue, React or whatever, you'd still tons of imperative js for each single webapp to define how it uses the framework.
Imagine not having html at all. You'd have to create pages from scratch imperatively by doing things like let element = createElement("p"); element.setContent("my paragraph"); parent.addChild(element); It'd be really ugly, a PITA to change stuff and error-prone.
htmx is the opposite of that. It tries to make web development declarative again, among other things.