What I know from client side rendering to react
Today NextJS is popular framework for developing full stack web app.
First of all I don’t consider NextJS being a full stack framework but front-end react framework with back-end integrated. It’s like you have been given npm create-react-app with react router and back-end configured. Never mind.
I would like to present my understanding on what is client side rendering and how it is better than server side rendering in terms of product delivering. I know no technology is good or bad it’s just in which context it is used.
So in server side rendering the load is lopsided to server code. The server code is divided into two parts: one part fetches the data from database called the controller and other parts renders HTML for you. The back-end communicates response to your front-end over HTML, not bits or bytes, or JSON. Along with HTML goes CSS and JS every time the user requests data in the front-end. But you have control over the user’s interaction when and where to fetch and how to display data. The load is much smaller.
Whereas this connection is loosened in case of client side rendering. The server code ships huge JS bundle to the client and then communicates with the server over JSON. Though it takes up huge time to load full application but it makes the website XP better as the whole website is native to machine of user. But it gives user a native feeling of the website. The load of website is total on user’s browser. We can reduce the load time by serving the bundles from CDNs.
Subscribe to my newsletter
Read articles from Aditya Roshan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by