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

    mysterious-toddler-20573

    06/26/2020, 8:18 PM
    caching and SQL, kids! It's gonna blow your MIND
  • b

    bright-honey-15993

    06/26/2020, 8:18 PM
    They think everything has to be a SPA
  • b

    bright-honey-15993

    06/26/2020, 8:19 PM
    Well, I'm a frontend dev, so I'm primarily interested in solving that for us. Likely means we keep the JSON API, no choice there.
  • b

    bright-honey-15993

    06/26/2020, 8:20 PM
    Though, I just see it as a data access layer anyways
  • b

    bright-honey-15993

    06/26/2020, 8:20 PM
    As a frontend dev, I really don't want to care about SQL, stored procs etc. Just gimme the API docs and I'm good to go
  • b

    bright-honey-15993

    06/26/2020, 8:21 PM
    But yes, lots has been coded to be screen specific, not ideal of course
  • b

    bright-honey-15993

    06/27/2020, 8:58 AM
    Given the above, as mentioned before, I wonder if there's much to be gained from possibly using htmx client-side templates and try to eliminate the need for a frontend server, though I guess once you plug in a client side router and start transforming data before/after POST reqs etc. you might be just better off using a js framework.
  • u

    user

    06/27/2020, 7:23 PM
    > is there a good forums option for open source software, or is discord where stuff ends up? @User Discord/Telegram usually
  • m

    mysterious-toddler-20573

    06/28/2020, 12:44 AM
    @User yeah, I have a tough time given your constraints seeing a huge boost to productivity or reduction in complexity. If htmx isn't helping you pull layers out and simplifying, I mean, I like it, but I can't recommend it wholeheartedly
  • b

    brash-house-85887

    06/28/2020, 12:57 AM
    Moving a conversation from the gitter, pasting my question here for context: Re-writing a site with htmx, I've eventually gotten the place where instead of being able to replace a small component of the page, I have to basically replace the entire page, because multiple, independent parts of the page change with a single user interaction. Is there some way to cascade, chain or parallelize requests from a single trigger?
  • b

    brash-house-85887

    06/28/2020, 12:58 AM
    Replacing the entire page isn't bad, but in that case, do I get as much benefit from htmx over just reloading the entire page without AJAX?
  • m

    mysterious-toddler-20573

    06/28/2020, 1:22 AM
    I think so because you don’t get the kerchunk of a full page replacement, you can use css transitions etc
  • m

    mysterious-toddler-20573

    06/28/2020, 1:25 AM
    hx-boost is designed for this idea as well: a kind of simplified turbolinks
  • m

    mysterious-toddler-20573

    06/28/2020, 1:25 AM
    You keep the ability to do smaller replacements where it makes sense but I don’t feel bad when I replace large chunks of the DOM
  • b

    brash-house-85887

    06/28/2020, 1:25 AM
    True. It might still be interesting to be able to allow two elements to refresh from an event. Like the search bar being cleared and the search results being cleared or reset when someone hits a "clear search" button.
  • m

    mysterious-toddler-20573

    06/28/2020, 1:27 AM
    https://htmx.org/extensions/path-deps
  • m

    mysterious-toddler-20573

    06/28/2020, 1:28 AM
    This extension might be useful for what you are trying to accomplish. Also check out our of band swaps: https://htmx.org/docs#oob_swaps
  • b

    brash-house-85887

    06/28/2020, 1:29 AM
    Thanks!
  • b

    brash-house-85887

    06/28/2020, 1:55 AM
    oob_swaps worked great. Really impressed with htmx.
  • m

    mysterious-toddler-20573

    06/28/2020, 2:20 AM
    Awesome!
  • b

    bright-honey-15993

    06/28/2020, 3:06 AM
    > @bright-honey-15993 yeah, I have a tough time given your constraints seeing a huge boost to productivity or reduction in complexity. If htmx isn't helping you pull layers out and simplifying, I mean, I like it, but I can't recommend it wholeheartedly @mysterious-toddler-20573 Completely understandable. There are many people in my position no doubt and unfortunately there's no ideal solution. Other than using a js framework, of course.
  • m

    mysterious-toddler-20573

    06/29/2020, 12:14 AM
    Some nice features coming in 0.0.7: *
    scroll
    and
    view
    modifiers in
    hx-swap
    to update scroll state relative to target after a swap *
    hx-vars
    for including javascript expressions as request variables easily *
    hx-push-url
    updated to alternatively take a string value of the URL to push
  • u

    user

    06/29/2020, 4:29 AM
    @User What should I do, when lazy-loading script? I.e. I have
    mousemove/mousedown/touchstart
    event listeners, that, when fired, attaching a script to the head of the page. But if I had any elements with
    hx-*
    attrs on the page before, the console will throw an error
  • m

    mysterious-toddler-20573

    06/29/2020, 2:22 PM
    Hmm, this looks like an error people have complained about with the way that I initialize my library.
  • m

    mysterious-toddler-20573

    06/29/2020, 2:23 PM
    https://github.com/bigskysoftware/htmx/issues/34
  • m

    mysterious-toddler-20573

    06/29/2020, 2:24 PM
    I want to move to rollup.js and figure out the build issues, but I have to admin my javascript build-foo is extremely weak, and I don't really want to work on it too much https://rollupjs.org/guide/en/
  • u

    user

    06/30/2020, 1:05 PM
    Who uses htmx with Django??
  • m

    mysterious-toddler-20573

    06/30/2020, 1:41 PM
    I know there is a django/intercoolerjs community but I haven’t seen much discussing htmx yet
  • b

    big-airline-13935

    06/30/2020, 7:49 PM
    Is there a reason that hyperscript doesn't initialise itself @User? In other words, why is this a required step?
    Copy code
    _hyperscript.start();
  • m

    mysterious-toddler-20573

    06/30/2020, 8:15 PM
    yeah, I'm struggling w/ that one
12345...1146Latest