https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • b

    brainy-ice-92385

    10/21/2022, 7:11 PM
    Yes, your server responds with html. You've got it. It doesn't need to be only that though, it can also respond differently for non-htmx usage. I don't think you're confused at all.
  • p

    proud-minister-85295

    10/21/2022, 7:13 PM
    Is that not bad for large, high-traffic apps, a server call for every time the DOM or small partial needs to change?, or is there some type of caching?
  • b

    brainy-ice-92385

    10/21/2022, 7:16 PM
    Have you ever had a problem with the amount of JSON you're sending? Json isn't the most efficient representation. When that becomes an issue, you can fix it, possibly by using a different pattern than HTML over the wire
  • p

    proud-minister-85295

    10/21/2022, 7:18 PM
    JSON is tiny compared to HTML, but more importantly, its only sent/received when needed, can even be cached in the browser storage and sent later, also time travel etc.
  • b

    brainy-ice-92385

    10/21/2022, 7:21 PM
    It's a fair and common concern. The answer's still the same: it's not a problem until it is, it's fixable at that point, and it hasn't been a common complaint with htmx or in other html over the wise communities
  • p

    proud-minister-85295

    10/21/2022, 7:22 PM
    Thank you for the replies
  • s

    sparse-musician-64201

    10/21/2022, 7:28 PM
    When you delete a row you can just return an empty response and hx-target="closest tr" and it all magically works. 🙂
  • m

    mysterious-toddler-20573

    10/21/2022, 9:08 PM
    The payload size, once you start getting into partial HTML vs. JSON, is usually pretty small, and dominated by other factors (latency, data store access, etc.). I think that in general you'll find htmx pretty snappy for most data sizes, but, of course It Depends ™️
  • w

    white-art-78549

    10/21/2022, 9:31 PM
    One of the most offputting parts of htmx website to me was the parts about hypertext hyperscript. I saw that scripting language and was like … “okay, now they are inventing a new language to vainly fight against JavaScript because of some likely flaw in htmx”
  • w

    white-art-78549

    10/21/2022, 9:33 PM
    The last thing I want is another scripting language that’s worse than JavaScript.
  • m

    mysterious-toddler-20573

    10/21/2022, 9:34 PM
    you mean hyperscript?
  • w

    white-art-78549

    10/21/2022, 9:34 PM
    Ah yes typo
  • m

    mysterious-toddler-20573

    10/21/2022, 9:35 PM
    Yep, hyperscript is an acquired taste. Some folks like Alpine for similar needs. In general, I've tried to keep htmx lean and trigger events in the right places to give people flexibility to add behavior around the tool.
  • m

    mysterious-toddler-20573

    10/21/2022, 9:35 PM
    Theory is that this is better than trying to handle every possible need, thereby bloating the core library.
  • w

    white-art-78549

    10/21/2022, 9:36 PM
    I feel like htmx would be better complemented by web components than esoteric scripting languages.
  • w

    white-art-78549

    10/21/2022, 9:36 PM
    But I’m new to htmx
  • m

    mysterious-toddler-20573

    10/21/2022, 9:44 PM
    hyperscript may grow on you, it's an interesting, different way of thinking about scripting in Hypermedia Driven Applications. But, at first glance, it can be quite shocking and strange looking. And the general approach, using events extensively to tie things together, is foreign to newer web developers. The good news is that it isn't required for htmx, it's a side project that works well with it, but it's independent and there are other options if you want to script within htmx, even plain vanilla JS is fine.
  • m

    mysterious-toddler-20573

    10/21/2022, 9:45 PM
    plenty of folks on the htmx train who wouldn't ever consider using hyperscript
  • w

    white-art-78549

    10/21/2022, 9:46 PM
    Is there any guidance on how people choose their route path names anywhere?
  • r

    refined-waiter-90422

    10/21/2022, 9:48 PM
    the secret sauce of htmx is it doesnt try to force technology onto you, you can choose whatever path you want there.. hyperscript can be a great fit, but you can use vanilla, jquery, surreal.js, umbrella, whatever. htmx will enable you write less JS in general, so it's a great opportunity to re-asses what you actually need.
  • w

    white-art-78549

    10/21/2022, 9:48 PM
    Yah, it’s really tempting, I’m a big Rust user, so the thought of using more Rust logic than JavaScript appeals.
  • r

    refined-waiter-90422

    10/21/2022, 9:50 PM
    htmx will be amazing for you then, it'll enable you to keep way more code in Rust
  • t

    thankful-computer-7658

    10/21/2022, 11:09 PM
    hey guys do anyone know why this could be happening and how to solve it? if the delete form have hx-boost="true" when I navigate to the register page it doesnt scroll source code: https://github.com/GabrielNBDS/plutus-haat
  • c

    cuddly-keyboard-70746

    10/22/2022, 5:47 AM
    I am intrigued by the grug page. Found a lot of my own learning and preferences are reflected into it. I expected a short fun piece, but it is a lot more comprehensive and sometimes very deep, kudos for that. While I also landed on integration tests as the ideal test (although I sometimes still call it unit test, just that my "unit" is larger than some might consider) I was wondering what is what grug doesn't like about mock testing? Is it the reflexion?
  • c

    cuddly-keyboard-70746

    10/22/2022, 5:48 AM
    grug didn't elaborate much about it.
  • r

    ripe-action-67367

    10/22/2022, 9:59 AM
    The answer depends on your page layout and response payload. This looks very much like a bug, but it would require a bit more information to reproduce and investigate.
  • r

    ripe-action-67367

    10/22/2022, 10:01 AM
    Your page has bottom drawer navigation, and you use tailwind. At the first glance, I suspect some classes being messed up
  • r

    ripe-action-67367

    10/22/2022, 10:01 AM
    But it's hard to tell
  • r

    ripe-action-67367

    10/22/2022, 10:05 AM
    Just to clarify, I don't think that tailwind specifically or your page layout is a problem. What I mean is that there is probably a utility class somewhere, that you used to implement your layout, but after submitting boosted for it ends up in an unexpected place
  • r

    ripe-action-67367

    10/22/2022, 10:11 AM
    Ohh, I figured it out
1...866867868...1146Latest