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

    flaky-energy-47039

    01/14/2023, 4:12 PM
    You mean, the htmx?
  • b

    boundless-vase-80440

    01/14/2023, 4:13 PM
    https://unpkg.com/hyperscript.org@0.9.7
  • b

    boundless-vase-80440

    01/14/2023, 4:14 PM
    the _ attribute is a hyperscript attribute
  • b

    boundless-vase-80440

    01/14/2023, 4:14 PM
    https://hyperscript.org/
  • b

    boundless-vase-80440

    01/14/2023, 4:15 PM
    brother project of htmx. the half-crazed, half-genius brother.
  • f

    flaky-energy-47039

    01/14/2023, 4:25 PM
    Omg, of course not, thanks! Terms like hyperscript are still magic to me
  • f

    flaky-energy-47039

    01/14/2023, 4:50 PM
    Now it works, thank @boundless-vase-80440
  • b

    boundless-vase-80440

    01/14/2023, 5:19 PM
    Thank @ripe-action-67367 , he dropped the clue
  • b

    boundless-vase-80440

    01/14/2023, 5:19 PM
    🙂
  • o

    orange-umbrella-16693

    01/14/2023, 5:26 PM
    https://www.builder.io/blog/hydration-is-pure-overhead
  • o

    orange-umbrella-16693

    01/14/2023, 5:26 PM
    How qwik works very much reminds me of htmx
  • o

    orange-umbrella-16693

    01/14/2023, 5:27 PM
    Except if I'm not wrong htmx does use hydration?
  • r

    ripe-action-67367

    01/14/2023, 5:33 PM
    AFAIK, both these terms are tightly related with modern client-side-rendered JS frameworks when dealing with SSR. They are not really applicable to htmx since htmx does not do client-side rendering as part of its normal operation at all (by default that is). It simply scans DOM tree and sets up event listeners on elements based on attribute values. Whether it fits definition of "hydration" or "resumability" I don't know, but considering drastically different models htmx and frameworks use, I'm hesitant to say so
  • r

    ripe-action-67367

    01/14/2023, 5:33 PM
    And what client-side rendering htmx can do is done with extension and much, MUCH simpler than what Frameworks do
  • t

    thankful-addition-60522

    01/14/2023, 6:24 PM
    being a memetard
  • o

    orange-umbrella-16693

    01/14/2023, 6:31 PM
    Well at the very least having global eventlisteners and finding elements dynamically seems smarter than registering event listeners for everything
  • l

    limited-king-55171

    01/14/2023, 6:42 PM
    Something I've had an issue with is somehow getting SSR for the few client-side bits that I need when using htmx. SEO is very important so I can't really go without SSR. And I definitely don't wanna use a JS backend, heh.. so that's a bit annoying
  • a

    adventurous-ocean-93733

    01/14/2023, 6:59 PM
    Why can’t you just render the client side stuff on the back end and deliver it in html?
  • a

    adventurous-ocean-93733

    01/14/2023, 7:07 PM
    (Not in the JSland “SSR” way, but the original web “hypermedia” way)
  • l

    limited-king-55171

    01/14/2023, 7:22 PM
    Not sure what you mean. If I do that, I'm basically limiting myself to using vanilla js for DOM modification, whereas I'd preferably use a more complete framework..
  • l

    limited-king-55171

    01/14/2023, 7:23 PM
    And those need the "SSR and hydration" stuff.
  • a

    adventurous-ocean-93733

    01/14/2023, 7:36 PM
    Hard to get into the detail, without knowing what you’re doing but htmx is modifying the DOM (just not in the same way as JS frameworks) and it can do an awful lot. For the true client-side stuff _hyperscript or alpineJS can do that. However, as you might know, the point of htmx is that there should be very little you need to with JS, because you’re using a hypermedia approach to fetch rendered HTML from the back end. I suppose what I’m saying is that JSLand SSR and Hydration are only required because of the SPA approach. htmx doesn’t require them and if your use of htmx does, then there’s a strong chance you could be using it wrong.
  • l

    limited-king-55171

    01/14/2023, 7:37 PM
    There's a lot of interactions that don't warrant a server request, so that's the use case I'm talking about. I'm not convinced alpine would be enough for what I need is all, so maybe it's a safer bet to go with an API + frontend approach.
  • m

    mysterious-toddler-20573

    01/14/2023, 7:57 PM
    maybe vue or petite-vue for the stuff that htmx doesn't work for? https://github.com/vuejs/petite-vue
  • l

    limited-king-55171

    01/14/2023, 7:58 PM
    I did consider those, but they have the same issue unless I mount the vue app to the innerhtml, and if I do that, variables will show up
    {{ like this }}
    until js loads which is kinda janky
  • m

    mysterious-toddler-20573

    01/14/2023, 7:58 PM
    😑
  • m

    mysterious-toddler-20573

    01/14/2023, 7:58 PM
    I'm an HTML guy, myself
  • l

    limited-king-55171

    01/14/2023, 7:59 PM
    I don't have much love for js, but I do realize it might be the better way to go for my use case..
  • b

    boundless-vase-80440

    01/14/2023, 8:03 PM
    What I would do is a proof of concept: select the client side bits that you are most afraid of and give them a shot with htmx+alpine.
  • b

    boundless-vase-80440

    01/14/2023, 8:04 PM
    that's what I do when I start to speculate too much.
1...984985986...1146Latest