News for hackers. Stuff that matters.
Re:Using React, Redux and SSR to acommodate users without Ja... by IshKebab on Sunday June 07, 2020 @05:57AM (#23446128)
I've been wondering about this recently too. I really want something that does almost everything server-side, like the old handlebars-style templates, but allows a modern component based page structure.

I guess React SSR is probably the closest thing to that but (without having used it) I'm guessing it is full of caveats given that React wasn't originally designed to work that way.

I wish there was something that was, and also was written in a language other than Typescript.

Re:Using React, Redux and SSR to acommodate users without Ja... by jaredcwhite on Sunday June 07, 2020 @10:41AM (#23447662)
We're building that.

https://beta.bridgetownrb.com

Use Liquid template components on the server-side that render out to static HTML, and for any interactive bits you can "hydrate" them with something like LitElement-based Web Components. A heavy SPA approach using React is simply not necessary for many types of sites.

Re:Using React, Redux and SSR to acommodate users without Ja... by Tade0 on Sunday June 07, 2020 @06:13AM (#23446203)
The main caveat is that you have to create alternative paths for situation where the thing is rendered on the server and client side - browser APIs are not available in the former case.

As for other options: Vue.js offers something like this with Nuxt.js.

There's also this:

https://sapper.svelte.dev

Interesting and pleasant, but still 0.x.x, so caveat emptor.

Re:Using React, Redux and SSR to acommodate users without Ja... by Legogris on Sunday June 07, 2020 @06:15AM (#23446213)
Everything old is new again.