4 ms·
What else would you send?
by apineda 6y ago
What else would you send?
- XCSme 6y agoNot to send data, but receive data and update the UI accordingly. I looked a bit through their examples and it seems that they expose a way to update the UI with the response from the AJAX calls, but probably server has to return the entire HTML code?
- recursivedoubts 6y agoyes, responses are expected to be in HTML but you can use the client-side-templates plugin if you want to run responses through a client-side template engine: https://htmx.org/extensions/client-side-templates/ https://htmx.org/extensions/client-side-templates/
- roel_v 6y agoI think they meant 'can you do stuff other than sending data' - other things that you'd use javascript for that is not sending data/ajax. Validation and stuff. I'm writing some extensions in what is essentially a 'local SPA' and I'd love to get rid of the inline onclick handlers and all their crufty syntax (but my last real experience working on the web was 20 years ago so my perspective is probably objectively primitive anyway).