Server-Side Rendering (SSR) vs Client-Side Rendering (CSR) in Next.js

Next.js supports server side rendering. All components are server side by default. The main issue with client side rendering is client will have direct access to server, which makes it easy to access and update data in server by client.

In order to avoid it additional API layer must be implemented which is again a overhead.

Server side rendering comes up with the better solution, here all the database queries/interactions are done in server side which are being executed at server. The results obtained by it are directly sent into the client side. By this, the client side will have no control over the data they receive.