Hacker News new | ask | show | jobs
by highwaylights 258 days ago
Being new to Datastar and having seen some of the hype recently, I'm really not sold on it.

The patch statements on the server injecting HTML seems absolutely awful in terms of separation of concerns, and it would undoubtedly be an unwieldy nightmare on an application of any size when more HTML is being injected from the server.

2 comments

Let's have scattered bits of JS inject HTML instead, that'll fix it!
This. I feel wrong having endpoints that produce bits of HTML.
Servers sending HTML to the browser? Scandalous!
What has the world wide web come to?!
Yes. It is OK for simple form submits but going to get annoying for anything that feels like an app.
There's a reason xpath and xls look they way they do - they're powerful, but not very comfortable :/

Reimplantations tend to simply some bits, but end up amassing complexities in various corners...

People today don't remember that assigning to innerHTML isn't a good idea, so anything goes.
"Bits of HTML" was for a long time so common and normal it has its own term: HTML fragments.
Not sure if satire, or serious. Well done, well done.