@forever @joepie91 @arcade I know! I recently saved someone from "prerendering" the pages of their multilingual dynamic website using headless browsers and waiting for the XHRs of thousands of URLs then saving the DOM. Now they're doing the bulk of the work server side with simple templating and they're amazed that prerendering one page doesn't take 8 seconds anymore but a fraction of one

@joepie91 @forever @arcade "cached for the lifetime of the server process" … "If you have database access or other async operations, they should be done in your routes." … "does not support mounting those views on the client"
I don't even know where to start. It's all needlessly convoluted and wasteful and many devs could be much less wasteful if they took the time to learn developing a proper approach with less abstracting tools. But that would require more time per money so let's be wasetful.

@alinanorakari @forever@fedi.nullob.si @arcade Huh? This is specifically about server-side rendering of templates, as an alternative to browser-side SPAs.

@joepie91 @forever @arcade neither of those two options are really desirable in any project with sufficiently complex data though, also writing templates for the static parts using JSX is total overkill. A solid server-side language plus a basic templating engine like mustache and a lightweight frontend framework like alpine.js can replace 90% of the react projects I've seen while being vastly more efficient server- and client-side, indexable by international search engines and _fast_

@alinanorakari @forever@fedi.nullob.si @arcade I'm not sure what you're trying to argue here... the first link isn't about React at all (it specifically uses a 'dedicated' server-side templating library), and the latter literally *is* a templating library that just happens to use JSX. I feel like you're assuming a certain complexity associated with 'React' that isn't actually there... React itself is pretty much just a data-to-HTML converter, just like any other templater really.

Follow

@alinanorakari @forever@fedi.nullob.si @arcade Like, to clarify: express-react-views runs on the *server* side, and functions like any other server-side templating library would

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.