"I think it would be funny to build a React fork that runs entirely server-side. The virtual DOM could be diff'd, and the diffs could be transmitted to the front-end via XSSR (again, no front-end JS required). I don't think this is very practical but it would be cool."
This is basically Elixir liveview, and it's awesome!
New-school SSR is similar to old-school SSR, but it does
involve a bit of front-end JavaScript logic. Generally, the
way it's implemented is that when the user will interacts
with the web page, the JS will make a request to the
back-end. Then, the back-end will return some HTML, and the
JS front-end will insert that HTML somewhere into the page.
This allows us to have dynamic pages, at the cost of having
to maintain some front-end logic.
Wouldn't it be nice if there was a better way?
> HTMX is doing exactly what is being described as "New-school SSR" so I'm not sure how it'd be better?
The key value htmx can provide (and maybe ParsleyJS for forms) is eliminating:
New-school SSR is similar to old-school SSR, but it does
involve a bit of front-end JavaScript logic.
Leveraging HTML5/CSS3/htmx/jQuery/ParsleyJS implies a browser can focus on its primary role - rendering content. When this approach is applicable, there is no "front-end logic" to maintain.
This is basically Elixir liveview, and it's awesome!