Depending on the website or web application we want to build, we may consider different rendering strategies. Every rendering strategy has its pros and cons, but the great thing about Next.js is that we don’t have to compromise. Instead, we can choose the best rendering strategy for every single page in our web application.

Let’s pretend Next.js doesn’t exist for a moment. Pretty scary, isn’t it? We want to build a web application using React, but we have to compromise between rendering strategies.

Client-side rendering

CSR is a great starting point. The application would be deployed as a JavaScript bundle that dynamically generates the HTML content once it gets downloaded to the web browser. The performances will be outstanding because all the computation will be done on the client side. In addition, the user experience will be amazing because the customers would feel as if they were using a native app. On the other hand, we’d have to struggle with SEO since CSR makes life harder for search engine bots.

Get hands-on with 1400+ tech skills courses.