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

    mysterious-toddler-20573

    04/12/2023, 10:30 PM

    https://cdn.discordapp.com/attachments/725789747212976259/1095838372397846538/image.png▾

  • interesting graph of the stars of the various projects
    m

    mysterious-toddler-20573

    04/12/2023, 10:30 PM
    interesting graph of the stars of the various projects
  • trpc has absolutely rocketed up
    m

    mysterious-toddler-20573

    04/12/2023, 10:30 PM
    trpc has absolutely rocketed up
  • holy smokes
    m

    mysterious-toddler-20573

    04/12/2023, 10:30 PM
    holy smokes
  • I believe it gets constantly shouted out by theo, who has a very big internet megaphone.
    r

    refined-waiter-90422

    04/12/2023, 10:58 PM
    I believe it gets constantly shouted out by theo, who has a very big internet megaphone.
  • this is very much in line with my priors, but I think the premise of RPC—it's just a function call!—is fundamentally broken, even if typescript is hot right now. network calls has wildly different failure modes from function calls, so you do in fact need to think about them differently.
    l

    limited-teacher-83117

    04/13/2023, 4:42 AM
    this is very much in line with my priors, but I think the premise of RPC—it's just a function call!—is fundamentally broken, even if typescript is hot right now. network calls has wildly different failure modes from function calls, so you do in fact need to think about them differently.
  • Crockford is a real grug type though, I'm a big fan
    l

    limited-teacher-83117

    04/13/2023, 4:50 AM
    Crockford is a real grug type though, I'm a big fan
  • Hi, dumb backend dev here. I've been enjoying updating parts of the page with the ease of htmx. I have a question though. What is the good practice for adding JavaScript, that interacts with these parts of the page that are swapped out in this single page type architecture? Should all the JavaScript be loaded on first load, or is there some way to parts of it when we load the part of the page that needs it.
    b

    brash-machine-54411

    04/13/2023, 4:51 AM
    Hi, dumb backend dev here. I've been enjoying updating parts of the page with the ease of htmx. I have a question though. What is the good practice for adding JavaScript, that interacts with these parts of the page that are swapped out in this single page type architecture? Should all the JavaScript be loaded on first load, or is there some way to parts of it when we load the part of the page that needs it.
  • I think organising your code around the idea that network calls are just rpc could work for small apps pretty well, and maybe it is even working, so that’s why trpc is getting more attention right now.
    e

    echoing-lion-55988

    04/13/2023, 10:37 AM
    I think organising your code around the idea that network calls are just rpc could work for small apps pretty well, and maybe it is even working, so that’s why trpc is getting more attention right now.
  • Theo’s YouTube channel is probably doing its job also
    e

    echoing-lion-55988

    04/13/2023, 10:37 AM
    Theo’s YouTube channel is probably doing its job also
  • On the other hand I am really cautious when it comes to popular tech and popularisation of tech through social media. We did it with micro services and serveless and a lot of small enterprises took it really serious, so they are ended up in distributed software architecture hell, where simple monolithic backend with Postgres could work flawlessly for them.
    e

    echoing-lion-55988

    04/13/2023, 10:40 AM
    On the other hand I am really cautious when it comes to popular tech and popularisation of tech through social media. We did it with micro services and serveless and a lot of small enterprises took it really serious, so they are ended up in distributed software architecture hell, where simple monolithic backend with Postgres could work flawlessly for them.
  • It’s hard to establish bs filter, most of the people can’t, so they are struggling with needless complexity.
    e

    echoing-lion-55988

    04/13/2023, 10:43 AM
    It’s hard to establish bs filter, most of the people can’t, so they are struggling with needless complexity.
  • never thought of it that way rofl
    r

    refined-waiter-90422

    04/13/2023, 11:39 AM
    never thought of it that way rofl
  • ya, in general optimize the big things (avoiding full page reloads) and don't bother with the small things (singular kb js), code complexity is a silent killer of projects.
    s

    sparse-musician-64201

    04/13/2023, 1:50 PM
    ya, in general optimize the big things (avoiding full page reloads) and don't bother with the small things (singular kb js), code complexity is a silent killer of projects.
  • b

    busy-action-85810

    04/13/2023, 2:29 PM
    Hey all. 👋 Just upgraded to HTMX 1.9.0 from 1.8.6 and noticing a strange situation where having an
    hx-trigger="click"
    with no
    hx-put
    on a Submit button within a form (parent element) which defines the
    hx-put
    no longer fires. There are no errors and no AJAX requests. In order to fix this, I had to copy the same code from the form (parent) for
    hx-put
    and add it to my submit button to make this work. Is it no longer possible to inherit this behavior from the parent in 1.9.0 like was possible in previous versions? I couldn't find any mention of this in the release notes so wanted to learn more.
  • m

    mysterious-toddler-20573

    04/13/2023, 2:53 PM

    https://cdn.discordapp.com/attachments/725789747212976259/1096085878042017792/image.png▾

  • m

    mysterious-toddler-20573

    04/13/2023, 2:54 PM
    hmm, that's probably a consequence of "naked"
    hx-triggers
  • m

    mysterious-toddler-20573

    04/13/2023, 2:54 PM
    hx-trigger wasn't intended to be inherited, so the behavior you are describing seems like what I would expect, very sorry for the unintended consequence
  • s

    stocky-dentist-80693

    04/13/2023, 2:55 PM
    They could have just stopped after the words "People don't like fat js clients".
  • b

    busy-action-85810

    04/13/2023, 2:56 PM
    Thanks, no worries. Also didn't realize you weren't suppose to rely on inheritance like this. Interesting. I liked that you could save some duplication by being implicit but maybe the explicit nature is better from a readability standpoint anyway. Hmm.
  • b

    busy-action-85810

    04/13/2023, 3:02 PM
    Actually, in going back to the documentation, maybe this needs a slight update: https://htmx.org/docs/#inheritance. Knowing what attributes can and cannot be inherited would be clarifying and helpful I think.
  • r

    refined-waiter-90422

    04/13/2023, 3:08 PM
    Y'know how you get your pet cat its own tiny keyboard because it wants to mimic you at work on the computer? That's the "vibrant ecosystem" of JS distractions.
  • b

    brash-machine-54411

    04/13/2023, 4:45 PM
    Thanks. I'll go with the load everything on first page load. However, I think I read about something in htmx that would load only once. That could be worth looking into. Unless I imagined it 😂
  • m

    mysterious-toddler-20573

    04/13/2023, 4:48 PM
    I like the "load stuff up front" approach for vanilla js, and the inline approach w/ Alpine/hyperscript
  • b

    brash-machine-54411

    04/13/2023, 5:12 PM
    For alpine, I currently load a function in x-data that returns an object. I guess this is the same as inline, but I've been wrong more times than right when it comes to front end.
  • l

    limited-teacher-83117

    04/13/2023, 6:11 PM
    Inheritance is specified on a per-attribute basis, so hx-trigger for instance cannot be inherited: https://htmx.org/attributes/hx-trigger/ But hx-target can: https://htmx.org/attributes/hx-target/
  • l

    limited-teacher-83117

    04/13/2023, 6:15 PM
    I might be misunderstanding your use case, but if your goal is to trigger the form on clicking the button, it should work if you simply
    type=submit
    your button and remove the
    hx-trigger
    from the form entirely
  • d

    dry-motherboard-2391

    04/13/2023, 6:24 PM
    Hey
  • d

    dry-motherboard-2391

    04/13/2023, 6:24 PM
    Been using intercooler/htmlx for a while, awesome piece of work!
  • d

    dry-motherboard-2391

    04/13/2023, 6:24 PM
    Became a sponsor today...
1...109210931094...1146Latest