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

    orange-umbrella-16693

    01/12/2023, 10:21 AM
    why not
  • b

    boundless-vase-80440

    01/12/2023, 10:53 AM
    why didnt I read the docs?
  • b

    boundless-vase-80440

    01/12/2023, 10:53 AM
    πŸ™‚
  • b

    boundless-vase-80440

    01/12/2023, 10:55 AM
    hmm, no mention of it in the docs, only on reference... why didn't I read the reference???
  • b

    boundless-vase-80440

    01/12/2023, 10:56 AM
    facepalm towards myself for not reading the damn docs/reference
  • m

    mysterious-toddler-20573

    01/12/2023, 12:25 PM
    table elements will be the death of me
  • o

    orange-umbrella-16693

    01/12/2023, 12:30 PM
    Unless it is wrapped in and appropriate table elements this stuff just doesn't get parsed
  • i

    icy-minister-29342

    01/12/2023, 12:50 PM
    hey htmx nerds and grug brains: a backend question. I've been working with Rails since the beginning (ie. It's Been 84 Years πŸ‘΅) and wanting to try something new for a side project and wondering what people are having the most fun with? Is there even anything that is significantly better for dev happiness than Rails? I like some things about #1033922649459535912 but am feeling like a full stack framework would make me less grumpy.
  • t

    tall-dinner-62086

    01/12/2023, 12:54 PM
    I am partial to laravel, and it should be an easy transition from rails (apart from switching languages entirely). I think most people here are on the django train though
  • i

    icy-minister-29342

    01/12/2023, 12:55 PM
    that's good to know, that django is popular here. learning python in 2023 is probably not a bad idea.
  • i

    icy-minister-29342

    01/12/2023, 12:57 PM
    and i like that django-render-block exists for fragments
  • i

    icy-minister-29342

    01/12/2023, 12:57 PM
    i probably wouldn't have more fun than I do with rails but learning a new thing is fun
  • b

    bland-coat-6833

    01/12/2023, 12:58 PM
    I’ve really been enjoying Sanic (https://sanic.dev/en/). Not as many batteries included compared to Django but that can be seen as a plus. It also ships with a nice server out of the box. It tries to have a really nice developer experience and I think it achieves it. Quick to get started with and easy to build on top of.
  • i

    icy-minister-29342

    01/12/2023, 12:59 PM
    Cool! Do you use it with SQLAlchemy or something else?
  • b

    bland-coat-6833

    01/12/2023, 1:02 PM
    So I actually use aiosql (https://nackjicholson.github.io/aiosql/) as I’m a fan of just using sql. But sqlalchemy works well with it. Or have a look at Mayim (https://ahopkins.github.io/mayim/). It’s written by one of the Sanic devs and is a nice way to get Python objects from sql queries. I plan to use it for my next project.
  • b

    bland-coat-6833

    01/12/2023, 1:03 PM
    I went from Postgres with an ORM to SQLite and raw queries and I’ve never looked back. Especially good for side projects imho.
  • m

    mysterious-tomato-195

    01/12/2023, 1:29 PM
    I have a very small one field form. When it's submitted and there's an error, the whole form is sent back with some error message. The problem is that I'd also like to show an alert message in case of a successful request, and another in case of a failure. It seems like html sent with a status code of 400 is not swapped in by htmx. I'm guessing this is an antipattern and I'd like to know what's the correct approach in this case. Should I handle potential error messages with hyperscript instead of using the swap mechanism?
  • r

    refined-waiter-90422

    01/12/2023, 2:09 PM
    You're gonna be hard pressed to find something with a happier dev experience than RoR, out of the box. As lllama mentioned, starlette+uvicorn and sanic are nice if you have time to invest, and are very fast non-blocking io. Pure Django is probably most equivalent to RoR.
  • r

    refined-waiter-90422

    01/12/2023, 2:16 PM
    If you're set on JS, Astro would be a first choice for me as well for DX.
  • m

    mysterious-toddler-20573

    01/12/2023, 2:16 PM
    I would respond w/ a
    200
    and perhaps use the
    HX-Trigger
    response header to trigger an event and show the error message. Or you could us an out of band swap.
  • i

    icy-minister-29342

    01/12/2023, 2:26 PM
    yeah that's what i was thinking too. it just seems 🍌🍌 that RoR is still at the top of the pile when it comes to getting stuff done, frustration-free after all these years
  • m

    mysterious-tomato-195

    01/12/2023, 2:32 PM
    ah interesting, I'll look into HX-Trigger, thanks!
  • m

    mysterious-tomato-195

    01/12/2023, 2:46 PM
    Is it possible to react to that header from hyperscript? I'm not sure if I'm doing something wrong or if that's not possible
  • m

    mysterious-tomato-195

    01/12/2023, 2:49 PM
    nvm, figured it out, sorry!
  • h

    hundreds-stone-62176

    01/12/2023, 3:59 PM
    htmx surfaced in the State of JS 2022 survey: https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/
  • h

    hundreds-stone-62176

    01/12/2023, 3:59 PM
    (down near the bottom in the "Other Tools" table)
  • r

    refined-waiter-90422

    01/12/2023, 4:00 PM
    probably through the power of enough people filling in "other"
  • h

    hundreds-stone-62176

    01/12/2023, 4:01 PM
    tied with SvelteKit, beat jQuery πŸ™‚
  • r

    refined-waiter-90422

    01/12/2023, 4:02 PM
    its a bit crazy that htmx doesn't have a dedicated option at this point considering the adoption and how many times its been on the front of HN.
  • r

    refined-waiter-90422

    01/12/2023, 4:03 PM
    I think they probably make options based on downloads on NPM or something.
1...980981982...1146Latest