Remix.run Logo
masfoobar 2 days ago

I have not used the templ library so I cannot comment on this. However, as this is more an htmx query I will focus on this --

htmx supports returning other responses, and you can handle their behaviour if you choose to.

At a basic level, validation/checks should be done on the server side. If there is a problem, you can return HTML. I dont see what the big deal is.

On another note, you can call a javascript function, for before and after some occurance, like doing a "swap"

You can check the status and go a different route if you so with.

These are just a couple of options and does not add much complication to the overall htmx design. You still end up with much less javascript code this way.