Server Side Rendering vs Client Side Rendering in React: Which one should you choose in 2023?

Craig Taylor
2 min readMar 28, 2023
Photo by Lautaro Andreani on Unsplash

In the world of React, Server Side Rendering (SSR) and Client Side Rendering (CSR) have been at the center of a heated debate for some time. While Next.js has emerged as the dominant framework for SSR, it’s important to understand that choosing between SSR and CSR is not a decision that should be made lightly. In this article, we’ll explore the pros and cons of each approach and help you make an informed decision.

If you’re a fan of CSR, you’ve likely enjoyed using Create React App, previously the default way to build a React app, which has now been dropped from it’s documentation entirely. You’ve probably written apps that are quick to respond to user interaction and display visually rich graphical content. CSR has a lot of benefits, especially when it comes to reducing processing costs and delivering faster load times after the initial page load.

However, there are times when SSR is the better choice. For example, if SEO is important to your app, SSR can ensure that your content is easily crawled by search engine spiders. Additionally, SSR keeps all API calls private, which cannot be monitored by watching the network traffic. With the emergence of Next.js and its App directory, SSR has become more accessible and less clunky to implement, making it a popular choice for many developers.

Despite Next.js’ popularity, it’s essential to consider your app’s functionality and user interaction before deciding on SSR or CSR. There is a danger of blindly choosing SSR because it’s the latest trend or because the App directory and Next.js make it easy to implement. Similarly, CSR shouldn’t be chosen solely because of its speed and cost-effectiveness. The right choice depends on the unique needs and requirements of your app.

In conclusion, deciding between SSR and CSR in 2023 is not a no-brainer decision. As a developer, you need to consider various factors such as SEO, user interaction, and processing costs before making a choice. While Next.js and its App directory have made SSR more accessible, it’s important not to overlook the benefits of CSR. In the end, the right choice for your app depends on what you’re trying to achieve and what your users need.

--

--