For relatively simple use cases of server-side rendering with React, I think it’s worth knowing that you can render <i>any</i> component to static HTML with just one function call (and it works in Node environment). Another function call (this time browser-only) can be used to make the markup rendered interactive with no unnecessary DOM mutations.<p>React library makes these functions available from ReactDOMServer[0]. I like this API, it opens various possibilities and is easy to build on top of.<p>Of course, Daniel goes further to create a universal approach to authoring an app that not only supports SSR but works without JS entirely, which is pretty cool!<p>[0] <a href="https://reactjs.org/docs/react-dom-server.html#rendertostring" rel="nofollow">https://reactjs.org/docs/react-dom-server.html#rendertostrin...</a>
How to accommodate users without JavaScript without changing the development flow in modern web app development is something I've been thinking about for a while, and I'm happy to finally share this writeup and proof of concept.<p>If you just want to check out the demo, you can do that here: <a href="https://todo-react-redux-noscript.herokuapp.com/" rel="nofollow">https://todo-react-redux-noscript.herokuapp.com/</a>
A big thank you to those who are starting to support people like me who are js-allergic for varied reasons of security, efficiency, privacy, and general control over our own machines.
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.<p>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.<p>I wish there was something that was, and also was written in a language other than Typescript.
If we are going to use SSR, why not use asp.net core mvc like frameworks. Its orders of magnitude easier to reason about and highly productive during development.<p>I used to be a fan for react, but a month ago I started a project in asp.net core mvc, and am hooked. Of course I have a lot of experience in c#, so that helps i guess.
If a website that is rendered in the browser using a JS framework adds SSR, does that mean that the client-side JS code will be delayed (not render-blocking) so that the first render can happen? How does that work?
I am curious on how SSR impact security. JS enabled web clients have many security mechanisms, but are there any relevant ones that are missing from the server side engine?
What reasons would you disable JS other than to block ads and tracking?<p>If it’s just those things, why would the developers want to accommodate those people? That would result in lost revenue.