36 ms·
Because my client knows how to display the data, and my server doesn't? I have a button in my app that, when clicked, sends a mutation to the server, and then c
by xmonkee 4y ago
Because my client knows how to display the data, and my server doesn't? I have a button in my app that, when clicked, sends a mutation to the server, and then changes it's display based on what the server returns. At this point, moving this functionality to htmx means that both my client and my server need to know how to style this button.
- canadianfella 4y ago[dead]
- listenallyall 4y agoThis particular example isn't very convincing. All HTMX needs to send back is a button element (or DIV with button inside it, whatever) with a class attribute. You already said the styling is based on what the server returns, so the server is perfectly capable of applying the correct class. Let client-side CSS do the styling, the server doesn't need to know anything.