Server Side Rendering
What is server side rendering?
Server side rendering (SSR) has been around since the beginning of web development. It was actually the first and main way to build user interfaces. However, with the growing influence of JavaScript and it’s client-side frameworks such as React, Vue.js, and Angular, client side rendering has grown drastically in popularity. CSR has quite a few advantages in that it is usually faster to build, great for single page applications, and client side routing. Client side routing is responsible for the navigation of the end user across the different parts of your application, and is credited for improved navigation speeds.
Does React use SSR?
In short, the answer is yes. But, also no. React can do both SSR and CSR depending on how the developer has built their application. In general, single page applications (SPA) build with react aren’t usually rendered on the server side, but React has engineered a way for your component to be rendered as HTML on the back end for optimal performance.
You can see above that this object was built for React to allow developer to get the benefits of both client side routing and server side rendering. Resulting in rendered HTML and faster load times.
What are the benefits of SSR?
Faster Load Times — Using SSR takes the load off of the browser by removing the amount of JavaScript and building that needs to take place after entering a web address.
SEO Optimization — SSR allows for search engines to more efficiently crawl your website for the important bits and bobs. This can improve your chances of landing potential customers, employers, employees, or really anyone with more than a general interest in what you’ve got going on. (Because who really goes past the first page on a Google search?) YOU WANT TO BE ON THE FIRST PAGE.
User Experience — This kind of touches on a perk we’ve mentioned previously in that, users will be happier if their request is met quickly. Users want quickly rendered websites, so much so that slow websites are the number one reason why users click away prematurely. And when you couple SSR with client side routing, you get the best of both worlds.
