Live data from Hacker News

Htmx 1.0.0 Release

htmx.org

31–40 of 62 posts

Re: Htmx 1.0.0 Release

#31

I'm the creator of htmx, glad to see this make HN. Happy to answer questions.

I really, really, really enjoyed working with intercooler.js on a previous project... I understand there’s no immediate need to upgrade, but what new features does this provide for new projects?

By the way, thanks!

Re: Htmx 1.0.0 Release

#32
post #3

> It's worth mentioning that, if you prefer, you can use the `data-` prefix when using htmx I don't know why people who make frameworks either prefer invalid HTML, or if they do allow people to write valid HTML they seem to show the invalid code in the docs You are not allowed to invent any old attributes you want and add them to any element and have it be valid HTML, but you can invent any attribute you want so long…

Practically, you are allowed to do so. I understand both sides of the argument, so I set it up so you could choose which one you preferred. I don't see a reason to force my preferences on anyone.

Not only do browser manufacturers disregard that request, I observe that IETF has gone back on their idea of prefixing application protocols with 'X-`. See RFC 6648: "Deprecating the "X-" Prefix and Similar Constructs in Application Protocols"

https://tools.ietf.org/html/rfc6648

If the HTML standard changes so much as to collide with 'hx-` then application developers using HTMX will likely have bigger compatibility problems to deal with. Besides, regex replacement on your HTML templates isn't hard.

Re: Htmx 1.0.0 Release

#34
post #21

I'm the creator of htmx, glad to see this make HN. Happy to answer questions.

I only wanna to say thanks for this project. I make a ecommerce platform on Rust (not yet public) and it become one of the main reason I could do this as fast as it have. Combining with tailwindcss I think is near the holy grail for backend-first web apps :)

[deleted]

Re: Htmx 1.0.0 Release

#35

I'm the creator of htmx, glad to see this make HN. Happy to answer questions.

Can you please explain how to build a "larger" app with HTMX?

The way I understand htmx, it will replace the tag itself with an ajax response from the server. This is great for submit feedback and flash messages.

What if you want to click a htmx-button and replace something else outside of the tag with htmx?

Re: Htmx 1.0.0 Release

#36

Earlier quoted context omitted.

Congratulations! What are the next directions for the scripting language?

I know htmx is a good idea, still waiting to see if hyperscript pans out. :) It still needs some pretty basic stuff like for loops and so forth. The goal is for it to be a embeddable, DOM-friendly & transparently asynchronous scripting language so you don't need to deal w/ callbacks: on click add .throb to me wait 3s remove .throb from me end I'd like to make ajax and web workers trivial to use from it. I hope to hav…

What are the advantages of switching to an interpreted runtime?

Btw I used htmx for a small project a few months ago and it was super easy to get working. Definitely recommend it, and looking forward to trying out 1.0 as soon as I have a chance!

Re: Htmx 1.0.0 Release

#37

I'm the creator of htmx, glad to see this make HN. Happy to answer questions.

Can you please explain how to build a "larger" app with HTMX? The way I understand htmx, it will replace the tag itself with an ajax response from the server. This is great for submit feedback and flash messages. What if you want to click a htmx-button and replace something else outside of the tag with htmx?

You can use the hx-target to target other elements in the DOM:

https://htmx.org/attributes/hx-target/

You can also use Out of Band swaps to replace arbitrary DOM content:

https://htmx.org/docs/#oob_swaps

Re: Htmx 1.0.0 Release

#38

I'm the creator of htmx, glad to see this make HN. Happy to answer questions.

I really, really, really enjoyed working with intercooler.js on a previous project... I understand there’s no immediate need to upgrade, but what new features does this provide for new projects? By the way, thanks!

Some things I can think of:

- no jQuery dependency

- trigger filters: https://htmx.org/attributes/hx-trigger/

- HTML validation integration: https://htmx.org/docs/#validation

- Out of band swaps: https://htmx.org/docs/#oob_swaps

- htmx has a more advanced swapping mechanism (swap and settle, not documented well yet) that makes it easier to use CSS transitions

Re: Htmx 1.0.0 Release

#39

Earlier quoted context omitted.

I know htmx is a good idea, still waiting to see if hyperscript pans out. :) It still needs some pretty basic stuff like for loops and so forth. The goal is for it to be a embeddable, DOM-friendly & transparently asynchronous scripting language so you don't need to deal w/ callbacks: on click add .throb to me wait 3s remove .throb from me end I'd like to make ajax and web workers trivial to use from it. I hope to hav…

What are the advantages of switching to an interpreted runtime? Btw I used htmx for a small project a few months ago and it was super easy to get working. Definitely recommend it, and looking forward to trying out 1.0 as soon as I have a chance!

more flexibility and easier to make it async-transparent since the interpreter runtime is basically a built in continuation system :)

Re: Htmx 1.0.0 Release

#40

I'm the creator of htmx, glad to see this make HN. Happy to answer questions.

The code examples look like this[1] on Firefox with Enhanced Tracking Protection enabled. I had to disable ETP for it to render correctly. [1] https://i.imgur.com/lIiQuE6.png

huh, ETP must be blocking unpkg...

I'll move that into the /js directory instead, thanks for the heads up

Post reply on HN