New website

My previous site was built on Next.js. When I was creating it, I was very influenced by youtube channels. Most said this.

React is the future.

Before, I thought it was true. And I believed it. That’s why I also made my first website from scratch in React. (my previous pages were just modified templates)

My previous website
My previous website that I used for a year

This website was slow. Like really slow. It was loading over 2MB of data and loading several KB of JavaScript to get anything on the screen at all. On powerful devices and fast internet, the site was quite usable. However, when I tried to run the page on a 1 Mb/s connection speed, the page took tens of seconds or even several minutes to load.

A normal user won’t wait a minute for a page to load. If it showed anything on the screen at all, like a loading screen. No, it had to wait for all the JavaScript to download before the loading screen for the rest of the page could be displayed.

Second website

After this incredibly slow page, I decided to make a better page. I thought I’d try a static site generator, but I wasn’t able to. Since then I haven’t worked with plain HTML, CSS and JS for so long that I just haven’t been able to write anything useful. It seemed to me that the development of the site was very slow. I was used to styled components such as Radix UI or CSS frameworks such as Tailwind CSS that I felt like writing classic HTML, CSS unnecessary.

So I ended up with React again. Now I chose Next.js, which has server-side rendering, so at least some HTML was sent to the user, not like the previous page that used Vite , so everything was client-side. But it was still quite slow. Definitely better than the previous one, but still not good enough.

My second website
My second website built with Next.js.

My opinion on React

I think React is a pretty good technology. But it shouldn’t be used for absolutely everything. React is good, for example, for Dashboard UI or very complex dynamic websites. But static websites such as Blogs, Portfolios and others should not be written in any Single-Page Framework in my opinion. JavaScript frameworks were made for complex web applications where there are a lot of reactive components etc.

Static websites should not have any JavaScript for me unless it is needed. A static website should be a tool for sharing information and ideas, not a bloated mess full of JavaScript and moving elements. Clearly, developer experience must also be taken into account. But if the page is very simple, I don’t think that writing HTML, CSS with some static site generator is complicated. Quite the contrary. When I was learning React, I was learning it for a long time and I still don’t know all the things and I don’t really understand a lot of things. I find static site generators much easier. You have no bloated mess. I learned the basics of Hugo in a few hours.

This website

That’s why I decided to completely redesign my website. I did this in a few hours. It’s nothing extra, a simple Hugo website. But nothing more complex is needed in my opinion. No kilobytes of JavaScript, no trackers. Just HTML and CSS. This website does not use any JavaScript. JavaScript is not needed for this type of website.

In conclusion

Of course I’m not saying that React is the reason why websites are slow. I think more impact cause NPM packages. As a developer i want to make my job as easy as possible, but with that I’m loosing performance and a control over my code when I use some package, that adds kilobytes of JavaScript to a bandwith. I would rather have to do it my self and have complete control over my code.