Get Started With HTMX Using Bun, Hono & more!

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 20

  • @gcollazo
    @gcollazo 11 місяців тому +11

    At 5:23, instead of triggering a htmx request on load, you could just render the to-dos in the component on the server-side. That way the first load of the page comes with all the to-dos already there. No need to use htmx to do that.

    • @cdbrw
      @cdbrw  11 місяців тому +1

      Oh thats a really good point. Pinning your comment so everyone can see it!

  • @agarridoboris
    @agarridoboris 5 місяців тому

    megalike to this video, the idea of using tsx as the templating language is great. i was looking for a templating engine but your approach is much better. Thanks

  • @outwithrealitytoo
    @outwithrealitytoo 23 дні тому

    htmx sends parameters in the URL by default because it make the URL meaningful in the history and bookmarks, and parameters can be included in the html/htmx attributes the same way i.e. without the webdev having to resort to browser side JS. Well, that's my understanding.

  • @Smoonwalkerm
    @Smoonwalkerm 7 місяців тому

    Im using this stack...and having a problem...I had to use htmx:afterRequest api on script tags, because I have other actions to do if a request ended correctly (like fire notifications, popups,etc)...my problem is I'm not being able of pass the htmx response data to another jsx component using params (because is inside script tags)...this is driving me crazy last two days, if you can give me a hand, would be much appreciated. Great video!

  • @gosnooky
    @gosnooky 10 місяців тому

    Notice how when you add "class" and "for" attributes, you get yellow warning squiggles - being a TSX file, it assumes you're using React which requires "className" and "htmlFor". With this non-React JSX you're using I assume these attributes are legal, so is there a setting in eslint that allows these without a warning?

    • @cdbrw
      @cdbrw  10 місяців тому

      I think this is more an editor warning than an eslint thing. With Webstorm, you can simply just hover over it and click "add to custom attributes" which will get rid of the warning for you. I don't see the same warnings in vscode.

  • @noext7001
    @noext7001 11 місяців тому +1

    was the point of htmx is not using tsx in the first place ?

    • @cdbrw
      @cdbrw  11 місяців тому +3

      .tsx just tells typescript that the file contains jsx which we're using simply as just a templating language
      With htmx the goal is to have our backend return html chunks which were doing through jsx

    • @muhammadhafizuddin2965
      @muhammadhafizuddin2965 11 місяців тому

      For fetching ajax request and all that yeaa, but do you save every state of the button in the server? Dont make sense right? Htmx is for talking with server, kot for doing some button changing state depending on variable. No need backend server for that.

    • @MarkVolkmann
      @MarkVolkmann 11 місяців тому

      @@muhammadhafizuddin2965Correct. For interactions that do not require sending anything server, many people that use htmx combine the use of Alpine. It has things in common with htmx such as it’s a small, client-side JS library and it is implemented as a set of HTML attributes.

  • @AbegazNap
    @AbegazNap 11 місяців тому

    your webstorm is looking kinda fine blud, mind sharing what theme you are using?

    • @cdbrw
      @cdbrw  11 місяців тому +1

      its called "one dark vivid" 🫡

  • @whatis_me
    @whatis_me 9 місяців тому

    Could you make htmx +django tutorials as well?

    • @cdbrw
      @cdbrw  9 місяців тому

      I can look into it 🤔

  • @TerenceKearns
    @TerenceKearns 7 місяців тому +1

    Your jump cuts are too fast to read the code.

  • @linodil
    @linodil 10 місяців тому

    Why didn't you choose elysia over hono

    • @cdbrw
      @cdbrw  10 місяців тому

      just mainly wanted to try something new

    • @linodil
      @linodil 10 місяців тому

      @@cdbrw Elysia is faster and more compatible with Bun. But what's your thought

  • @technoM4niac
    @technoM4niac 11 місяців тому

    Incredible video.