Server-side rendering AKA Isomorphic JavaScript AKA Universal JavaScript is the pipe dream idea of running your same JavaScript code on both the server and the client. Why is that beneficial? Well, you’ll typically benefit from code reuse, improved performance, and SEO gains. The more appropriate question is are the benefits you gain worth the complexity you’ll add? When building a server-rendered app, there are more circumstances you have to consider.
Which code will be shared?
Is there initial state that needs to be shared?
How do you handle routing on both the server and client?
Because all of these questions can be answered linearly, we’ll take the same approach with this post.
We’ll start off with the bare basics, solve it, then add in more complexity. By the end, you’ll be able to decide if the complexity trade-off of server rendering is worth it for your specific application.
If this is a new concept to you, it’s important to grasp the big picture of how all the pieces fit together before diving into the details.
Read more
|