3 ms·
You're probably comparing htmx with client-side framework like React. Unlike those client-side ui framework, htmx is used to enhance standard html pages, such a
by neurostimulant 4y ago
You're probably comparing htmx with client-side framework like React. Unlike those client-side ui framework, htmx is used to enhance standard html pages, such as those outputted by server-side web framework. Those frameworks typically renders detail and form page separately, and htmx can combine them into a single interactive page. For example, when you reply a comment in HN, it'll open the form as a new page, and when you submit the comment, it open another page. htmx can combine all of those pages into a single interactive page.
- robertoandred 4y agoBut it's still as slow as two separate pages?
- neurostimulant 4y agoShould be a bit faster because it only requests a piece of html fragment which then get swapped into the dom instead of reloading the whole page again.
- recursivedoubts 4y agothere is a good talk on a real world react->htmx port here: https://htmx.org/essays/a-real-world-react-to-htmx-port/ https://htmx.org/essays/a-real-world-react-to-htmx-port/ in which improved performance features as a big part of the realized benefit of the conversion of course, not every application is going to be amenable to a hypermedia-style approach, so your mileage may vary: https://htmx.org/essays/when-to-use-hypermedia https://htmx.org/essays/when-to-use-hypermedia
- andybak 4y agoSlower than what? In my experience, simple page loads are usually blazingly fast assuming you're not on 2g or something. It's heavy client-side frameworks that often feel slow.
- robertoandred 4y agoYou've never used backend frameworks like WordPress? They can be very slow.
- andybak 4y agoYes. That's why I specified "simple page loads". If your frameworkless website is slow then the fault doesn't lie with the nature of http or the intrinsic overhead of full page loads. You've got a shitty backend framework, database or network.
- switch007 4y agoAre your (repeated) questions in good faith, or are you taking a swipe at the project?