give up React

Hidden text

This article is a reflection of experience; most of the web applications we make are static. This article is for businessmen who want to understand a little when React is needed and when it can be abandoned. If you are a developer, then do not waste time on this material, here we describe only our experience.

People often come to us from other developers. When we start to look into it, we understand: the customer was offered completely unnecessary features. These same features not only extend the project time, but also increase its cost, but do not bring tangible benefits. An example is server-side rendering in the browser or client-side. What it is?

Rendering is the process of converting code into a rendered page. The most common types are on the server (server side rendering, or SSR) and in the client browser (client side rendering, or CSR). Recently, we have been increasingly using server rendering using HTMX technology and recommending it to our customers. In this article we will tell you why.

People often come to us from other developers.  When we start to look into it, we understand: the customer was offered completely unnecessary features.

People often come to us from other developers. When we start to look into it, we understand: the customer was offered completely unnecessary features.

We haven't abandoned React or Vue. js completely, we just use it exactly where these technologies are really required.

How does server-side rendering differ from client-side rendering?

With server-side rendering, the conversion of code into a finished page occurs on the site server. When a user goes to a site, the server receives a request. It accesses the site’s database, processes the data and sends an HTML file to the user’s browser.

Client-side rendering is a newer technique that uses JavaScript. The data is not converted on the server, but directly in the browser. The server does not send the HTML file ready for display to the browser, but only its skeleton. JavaScript files are transmitted along with it: they contain information about what exactly the user should see. First, the browser loads the HTML, and then JavaScript data is embedded into the file – once the data is loaded, the user sees the page and can interact with it.

You can learn more about how both types of rendering work in this article. And we will talk about the advantages of rendering on the server from our point of view.

The first advantage of SSR is development speed

Server rendering is a must-have for businesses that want to launch quickly. The secret to high speed is simpler code and fewer bugs.

Working with client rendering is more difficult: there is more code. To somehow speed up the process, developers use resource-intensive libraries or frameworks, the most popular of which are React and Vue. Calculations take place not only on the server, but also in the client’s browser. Complex logic entails errors caused, among other things, by the use of JavaScipt. Correcting errors takes precious hours.

We have already told the story of how we chose CSR – and then drowned in bugs: the files turned out to be too heavy for the client’s video cards. We rewrote the application from scratch to SSR at our own expense, and the customer lost time.

You also need to remember that some users disable JavaScript in their browser settings – in this case, the site may not load at all. With server rendering, we do not depend on JavaScript: even if the user has disabled it, the page will still be displayed correctly.

The second advantage of SSR is saving money

One of the reasons why agencies offer CSR to clients is a high check. Although the cost per hour for server and client rendering is approximately the same, SSR benefits from fewer hours. This affects the cost of not only development, but also launching startups in general.

For example, we are making a zoo guide ZooBiZoo. The development of such a service per month using server rendering cost about 700 thousand rubles. If we had used client rendering, it would have been around 800–900 thousand. There seems to be little difference. But if you calculate the costs of project development, savings can reach up to 1 million rubles per year. This money can be safely invested in advertising.

When is client-side rendering appropriate and when is it not at all?

Still, there are times when CSR is needed. We recommend it where interactivity and instant response are important: in graphic and text editors like Canva or Google Docs, gambling industry projects, streaming services. SSR is simple and convenient – but not designed to “do it beautifully.” With it, it is impossible to realize an idea with complex animation that plays instantly when opening a page.

People often come to us from other developers.  When we start to look into it, we understand: the customer was offered completely unnecessary features.-2

People often come to us from other developers. When we start to look into it, we understand: the customer was offered completely unnecessary features.-2

Yes, there are industries where server rendering loses. But most projects can do without the bells and whistles of JavaScipt. We believe that banks and social networks can partially move to SSR, although now they use client rendering more often.

In general, server-based rendering is an ideal option for projects with static content. As a rule, on such sites the capabilities of React and Vue are not used to their full potential. It turns out that the customer overpays for CSR where they can save money.

Our goal is not to take as much money as possible – and for the sake of this, put expensive specialists to work hours. Therefore, if it is possible to solve your problems using simpler rendering on the server, we use it.

_
Our channel in the cart: https://t.me/wappdev
Our website: https://wapp.dev/

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *