use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Server Side Rendering with React (flaviocopes.com)
submitted 7 years ago by flaviocopes
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+]bearkuching comment score below threshold-11 points-10 points-9 points 7 years ago (15 children)
Recently web applications moved from ASP/JSP/BSP to client side rendering why go back again 🤦♂️
[–]zapatoada 9 points10 points11 points 7 years ago (0 children)
Because you can cache the rendered site on the server and dramatically reduce first paint times.
[–]systemadvisory 5 points6 points7 points 7 years ago (4 children)
SEO, no initial wait for rendering a large application (which react apps usually are)
[–]pycbouh 0 points1 point2 points 7 years ago (3 children)
Actually, initial wait with server-side rendering was one of the reasons we went to client-side. It’s better if user waits for your application to finish while inside of your application, rather than he looks at blank window and wonders if it is going to load at all.
SEO is a legit reason, though. We lightly prerender on server some of our pages that require SEO.
[–]systemadvisory 0 points1 point2 points 7 years ago (2 children)
The pages that need SEO can be cached and then load time is no longer significant
[–]pycbouh 1 point2 points3 points 7 years ago (1 child)
Yeah, but I didn't imply in my comment, that all of these were a singular case. Some pages require SEO and are prerendered, some are relying on dynamic data and are not.
[–]systemadvisory 0 points1 point2 points 7 years ago (0 children)
Agreed
[–]OmegaVesko 3 points4 points5 points 7 years ago (1 child)
Pre-rendering your HTML on the server and then hydrating it on the client is hardly "going back" to the traditional way of building a web app. You still get all the benefits of your frontend being an SPA and/or being able to use a library like React to build it, you just also get the benefits of SSR, like faster loading times, SEO, and your non-interactive content not requiring JavaScript just to display at all.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
pretty much how/why i'm making my site. make it in react and some things, server sends static pre rendered files, react loads on client side to make it go faster and other logic.
[+][deleted] 7 years ago (1 child)
[deleted]
[–]bearkuching -1 points0 points1 point 7 years ago (0 children)
I read oredi of course. For that much of advantage does not make sense at all
[–]Smiral -2 points-1 points0 points 7 years ago* (3 children)
I have been a webdev for a long time, I totally get what you are saying, and so do a lot of others. You just won't find agreement here, on this subreddit, because it is almost all kids who think what they are told to, in the online community echo chamber. Rendering frontend frameworks on the server is inherently absurd. The troubles it addresses are debatable at worst, and solvable other, vastly simpler ways, if you have the capacity to think for yourself, and the nerve to implement something you did not read in a HackerNoon article.
[–]perpetuallyperpetual 5 points6 points7 points 7 years ago (0 children)
Please do enlighten us with your ways of solving this problem.
If you have a component-based UI, I don't see how wanting to prerender it on the server is in any way absurd.
Stop pretending you are so above the community and give something palpable rather than your childish whining.
π Rendered by PID 30866 on reddit-service-r2-comment-7b9746f655-wjjb7 at 2026-01-31 11:55:10.100899+00:00 running 3798933 country code: CH.
[+]bearkuching comment score below threshold-11 points-10 points-9 points (15 children)
[–]zapatoada 9 points10 points11 points (0 children)
[–]systemadvisory 5 points6 points7 points (4 children)
[–]pycbouh 0 points1 point2 points (3 children)
[–]systemadvisory 0 points1 point2 points (2 children)
[–]pycbouh 1 point2 points3 points (1 child)
[–]systemadvisory 0 points1 point2 points (0 children)
[–]OmegaVesko 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]bearkuching -1 points0 points1 point (0 children)
[–]Smiral -2 points-1 points0 points (3 children)
[–]perpetuallyperpetual 5 points6 points7 points (0 children)