4 ms·
Can anyone explain why Htmx is such a big deal? I really don't get their 'motivation' section on their landing page. I mean, for example, the first motivation
by martijn_himself 3y ago
Can anyone explain why Htmx is such a big deal? I really don't get their 'motivation' section on their landing page.
I mean, for example, the first motivation it lists is 'Why should only <a> and <form> be able to make HTTP requests?', why is that an issue? And 'Why should you only be able to replace the entire screen?', I mean that hasn't been an issue since XMLHttpRequest or am I missing something?
- tracker1 3y agoHTMX is meant to relatively cleanly interact with updating portals on a rendered page. Where the serve-side handles the post data and simply returns the HTMX fragment that gets injected/replaced. I can see the appeal, it's what ASP.Net WebForms probably should have been. And for that matter could probably cleanly fit with ASP.Net MVC and Razor views.
- jagged-chisel 3y ago> 'Why should only <a> and <form> be able to make HTTP requests?', why is that an issue? I wouldn’t call it an issue, but maybe you would like individual elements to fetch their own data. Sure you can do the same thing with JS in the browser (calling fetch or XMLHttpRequest), but htmx lets one do it with attributes on tags. The “replace the entire screen” business is a jab at React-like frameworks. Although they all claim to update only the DOM parts that change, it’s very easy for a codebase to [accidentally] force a full page redraw.