Hacker News new | ask | show | jobs
by mercer 3506 days ago
I suspect that in most cases time spent loading the initial data is dwarfed by the initial app payload and turning the data into html.

Server-side rendering solves this by sending you a full 'screenshot' of the initial app, even before the app is downloaded and 'fresh' data is requested.

The clever thing React does in this use-case is that even though the initial load is 'finished' html, React won't have to re-render the entire thing once your app is loaded and requests new data. Instead, it will be able to seamlessly take over and update only what's new, and do its usual thing from there.

One issue you could run into is that users start trying to interact with your app before React has taken over. I'm not sure if that's a problem in practice though, perhaps others can chime in.

1 comments

You can achieve that with almost any framework.
I never claimed otherwise, but yeah, it's not something unique to React.

Could you elaborate on how this works with other frameworks? Does it work out of the box in most cases, or require some plugin/module?