3 ms·
I want to handle a JSON response because I usually return data for multiple page elements. These aren't external APIs, they're requests to the backend server.
by cpburns2009 3mo ago
I want to handle a JSON response because I usually return data for multiple page elements. These aren't external APIs, they're requests to the backend server.
A simple example is adding a note to a product or order. When you submit it, it gets inlined, and say a visual note counter is incremented. Usually I'll return multiple HTML fragments if it's convenient, but I'll return a data structure if needed.
- Doxin 3mo agoYou can return data for multiple page elements with HTMX too using the "OOB" mechanism.