5 ms·
Isn't SSR React notoriously slow? Whats the benefit here over a standard templating language?
by jamil7 7y ago
Isn't SSR React notoriously slow? Whats the benefit here over a standard templating language?
- m12k 7y agoI think it says Next generates a static site - in that case the cost of SSR is only incurred when compiling the site, so speed isn't really that much of an issue unless it's a gigantic site.
- fidelramos 7y agoYou can use the same components in server and client-side rendering, which can be very useful in many cases.
- tarruda 7y agoNever used SSR React, but one possibility comes to mind: It makes easier for single page JS apps to have compatibility with browsers that have JS disabled by allowing more code reuse between JS and no-JS versions.
- deleted 7y ago[deleted]
- mcjiggerlog 7y agoIn the way it's being used here it is rendering out every page to a bundle to be served as a static site - there is no server side rendering to speak of really.
- danielstocks 7y agoIt can be, but I’m not running a server in production: I’m using the static site generation feature in Next (comparable to Jekyll or Gatsby). It takes an input (Markdown in my case) and spits out a bunch of HTML files that are later deployed on a CDN. No server-side runtime required.
- koolba 7y agoTypeSafety is a big one. Most “standard” template languages default missing variable references to empty values and would only throw an error due to dereferencing an empty value. This would catch all those errors in advance at compile time.