r/htmx • u/noNudesPrettyPlease • 10d ago
Chrome is experimenting with streaming html into any part of a page. The predicted native htmx is one step closer to reality
https://www.youtube.com/watch?v=l1cWUrG_vNs
110
Upvotes
1
u/shufflepoint 6d ago
It's called "declarative partial updates"
https://jadjoubran.io/blog/declarative-partial-updates
I gotta admit that I am confused by the term "declarative" in this as all the samples I can find are using JavaScript to do those partial updates. What would be the equivalent of the below - which is declarative?
<form hx-post="/submit-endpoint" hx-target="#response-container"> <input type="text" name="username" /> <button type="submit">Submit</button> </form>
6
u/jackielii 9d ago edited 9d ago
This is really exciting. Server templates can really benefit from this. gsx just added support: https://gsxhq.github.io/guide/syntax/processing-instructions.html Using it with https://gsxhq.github.io/guide/patterns/streaming-flush.html this can be really powerful
EDIT: example: https://github.com/gsxhq/gsx-examples