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

    boundless-vase-80440

    12/14/2022, 9:42 PM
    htmx is client-side only
  • m

    mysterious-toddler-20573

    12/14/2022, 9:42 PM
    i think a chat app is right on the edge
  • m

    mysterious-toddler-20573

    12/14/2022, 9:42 PM
    maybe using SSE or web sockets
  • b

    boundless-vase-80440

    12/14/2022, 9:42 PM
    it supports websockets...
  • m

    mysterious-toddler-20573

    12/14/2022, 9:42 PM
    but that's the outer edge of hypermedia
  • m

    mysterious-toddler-20573

    12/14/2022, 9:42 PM
    (basically I just pretend I know what @gorgeous-ghost-95789 and @ripe-action-67367 are talking about)
  • s

    shy-napkin-38132

    12/14/2022, 9:47 PM
    this the right place to ask what htmx users prefer as their server backends?
  • s

    shy-napkin-38132

    12/14/2022, 9:51 PM
    Coarse Grained Interaction
  • m

    mysterious-toddler-20573

    12/14/2022, 9:59 PM
    django is probably the most popular, but htmx will work well w/ anything that can produce HTML
  • r

    refined-waiter-90422

    12/14/2022, 11:04 PM
    lol @ the HN link, just dumps people right to the docs. cool.
  • r

    refined-waiter-90422

    12/14/2022, 11:04 PM
    yup saw that too, love it
  • r

    refined-waiter-90422

    12/14/2022, 11:05 PM
    big jquery 4.0 about to drop:
  • r

    refined-waiter-90422

    12/14/2022, 11:09 PM
    cool to see so many devs waking up to htmx
  • o

    orange-umbrella-16693

    12/14/2022, 11:27 PM
    Isn't HTMX in the long run gonna eat up more bandwidth than JSON requests and clientside building? Or does on-the-fly gzipping basically make them equal with how compressible XML text generally tends to be
  • r

    refined-waiter-90422

    12/14/2022, 11:39 PM
    yup gzip really helps, but also one image or heavyweight client javascript library will blow away your bandwidth benefits of json-only.
  • r

    refined-waiter-90422

    12/14/2022, 11:42 PM
    the real win to consider is the complexity decrease.
  • s

    shy-napkin-38132

    12/14/2022, 11:44 PM
    This is always what I’m after. If I can minimize complexities for my team then we inevitably ship better code that tends to be more lightweight over the wire.
  • s

    shy-napkin-38132

    12/14/2022, 11:44 PM
    I haven’t looked at how to pull off things like code splitting yet. Like the sortable example… don’t want to load that on every page.
  • r

    refined-waiter-90422

    12/14/2022, 11:45 PM
    yeah ergonomics, intuitiveness, simplicity, are all gifts that keep on giving.
  • b

    bumpy-kangaroo-60192

    12/15/2022, 12:01 AM
    Is hx-swap-oob the preferred route for updates via partial renderings?
  • m

    mysterious-toddler-20573

    12/15/2022, 12:10 AM
    ideally partials are explicitly targeted since oob is a little opaque
  • m

    mysterious-toddler-20573

    12/15/2022, 12:11 AM
    but if you need to update two places at the same time, it is what it is
  • v

    victorious-thailand-80225

    12/15/2022, 4:54 AM
    @shy-napkin-38132 I have been using Clojure with htmx. I haven't done much dev in js land, but I take every opportunity not to go there. Yesterday built a simple support tool to diff users (configs, settings, static data, etc) using Clojure + htmx as part of a hackathon and I got to say, the combo is very productive for that sort of thing where you are time constrained. Plan to use for many things in future. htmx in my opinion is somewhat close to the Clojure philosophy (Clojurists will not agree with everything said by grug though). There's an old Rich Hickey talk where he's calling for simplicity as opposed to ease where he says something along these lines: "`npm install hairball` is easy, but it's not simple.". I'm glad there's htmx - a javascript library to get rid of javascript. For my modest needs, this suffices.
  • t

    thankful-addition-60522

    12/15/2022, 7:46 AM
    anyone else had htmx appending your scripts in
    <head>
    to before
    </body>
    on blink?
  • f

    freezing-controller-74032

    12/15/2022, 9:41 AM
    Hi guys. Can you help me please ? How can i change css style with post action response ? For example i have
    Copy code
    xml
    <div id="form" class="form-class" style="display:none;">
    i want change div style to
    Copy code
    xml
    <div id="form" class="form-class" style="display:block;">
  • f

    freezing-controller-74032

    12/15/2022, 10:01 AM
    I need to make it replace the div but everything inside the div remains unchanged hx-swap replace everything
  • b

    blue-gold-89534

    12/15/2022, 10:23 AM
    can you not swap the whole div in newly with a different style?
  • f

    freezing-controller-74032

    12/15/2022, 10:25 AM
    I can. Then all content inside this block is deleted if it is not returned in the response
  • b

    blue-gold-89534

    12/15/2022, 10:27 AM
    ok ... so what I do would be: add a
    hx-trigger="click[stylechange()]"
    to the div and write a JS function
    stylechange()
    that changes the style from
    display:none;
    to
    display:block;
  • f

    freezing-controller-74032

    12/15/2022, 10:29 AM
    Thanks a lot. I thought about it but didn't know how to implement it. Is it possible to change this so that it does not run the function after the click, but after it receives a response to the request?
1...949950951...1146Latest