I really want to try htmx but it specifically prohibits my most common usecases: 1) I want to take a JSON response, create HTML from it, and replace the target element with the generated HTML. 2) Similar to the above, take a JSON response, perform some action, and do nothing to the source element. Is there a plugin to add this? I want to move away from jQuery, and having a small framework to wire up hooks would be us…
Why are you so wedded to JSON responses? HTMX is meant to be used to render html; my big HTMX app basically never(1) renders JSON, so much so that I have a standing instruction to coding agents that if they're rendering JSON they're probably doing something wrong. If you're attached to JSON because you're working with external API s you don't control, a good place to perform those kinds of actions is in your backend,…
I'd assume because of the conception that json = data. Html = presentation. But if you just use barebones html, this could work very well. Just add a wrapper in the api to return json as html to try it out a bit.