3 ms·
Maybe I am missing something, here. Generally speaking - when you make an HTTP request - you are likely returning: XML <root> <users> <user>
by masfoobar 3y ago
Maybe I am missing something, here.
Generally speaking - when you make an HTTP request - you are likely returning:
XML
<root>
<users>
<user>
<id>1</id>
<name>foo</name>
</user>
</users>
</root>
[or]
JSON
{
"users": [{
"id": 1,
"name": "foo"
}]
}
[or]
HTML:
<div class="users">
<div class"user">
<span class="user-id">1</span>
<span class="user-name">foo</span>
<button class="btn btn-small">edit</button>
</div>
</div>
[When using HTMX, you would add some additional tags. You are still just returning HTML]
<div class="users">
<div class"user" hx-target="this" hx-swap="outerHTML">
<span class="user-id">1</span>
<span class="user-name">foo</span>
<button hx-get="/user/1/edit" class="btn btn-small">edit</button>
</div>
</div>
What makes this anymore (or any less) dangerous? What is the problem?
I guess responses is more in line with -- "they tooook our jooooowbs!"
From what I read elsewhere.
"React creates jobs. HTMX doesn't"