React server-side rendering

What is server-side rendering?

In the past, rendering work was mostly done on the client side, so why do we now let the server do this work?

Is there any difference between server-side rendering and client-side rendering?

In fact, there are many tools for server-side rendering, and you can quickly get started by reading the manual without much difficulty. The key lies in which scenes we need to use server-side rendering and which rendering scheme is more suitable for our project; To understand the nature and reasons behind server-side rendering, we need to first understand the basic concepts and principles of server-side rendering, why server-side rendering occurs, what problems it has solved, and master the overall rendering logic and ideas. Only then can we learn how to use tools easily and freely. Even if there are changes and updates to the tools in the future, we can still be proficient and no longer say that we cannot learn;

This logic is the concept of Dao, Fa, Shu, and Qi; Don’t just stay in the use of tools and the ingenuity of some tools, grow more towards the level of Dharma and Dao.

What is SSR?

Most modern front-end projects are single page applications, also known as SPA. The entire application has only one page, and different page contents are displayed through components. All data is obtained by requesting the server and then assembled and displayed on the client side; This is the default rendering logic of the current front-end framework, which we refer to as: Client Side rendering scheme (CSR for short);

The loading and rendering process is as follows: HTML/CSS code –>loading JavaScript code –>executing JavaScript code –>rendering page data.