Reputation: 9777
When libraries like React talk about "server-rendering", can I simply understand it as that it generates strings of HTML from representations of DOM elements such that when the browser sends a XMLHttpRequest the server returns a string of HTML (rather than a string encoding some JSON object) and we can just append that into a part of the page? Or does "server-rendering" do a lot more than simply generating strings of HTML?
My understanding of the term rendering is that of drawing lines on a screen. So I'm having trouble understanding the nature of "server rendering".
Suppose I have a website with static content (e.g. a blog), page-rendering-performance-wise, is there any advantage in using tools like React in the back-end on a node server for "server-rendering" instead of having a static server (using a static-site generator like Jekyll)?
Upvotes: 0
Views: 100
Reputation: 943635
Server rendering generates the entire page on the server.
This is used so that:
Suppose I have a website with static content (e.g. a blog), page-rendering-performance-wise, is there any advantage in using tools like React in the back-end on a node server for "server-rendering" instead of having a static server (using a static-site generator like Jekyll)?
No. React style server rendering is as a backup to massively ajaxified SPAs. It is there to counter the drawbacks of not using simple static pages.
Upvotes: 2