Blog Home Kelvin Jackson

Not Every Project Needs React!

The title more or less says it all, but it bears repeating as many times as you can stand: a software project should only use the tools it truly needs, rather than bringing in the latest and greatest cool new framework when all that was really _needed_ was a basic static website. Although the overuse of React is not the only case where this occurs, it makes for a good example.

ReactJS, to be clear, is a very useful tool. I enjoy working with it, and I daresay it has made many projects that I've worked on easier. However, it would have been overkill to use it for a tiny website with a counter or other minimal self-updating component that can easily be written in vanilla JS, let alone for a completely static site like this blog. There's simply no need for a special framework when the entire script logic of your site can be expressed in a few dozen lines of JavaScript squirreled away in a <script> tag or a single scripts.js file. Loading ReactJS every time will make the site significantly slower and consume resources that shouldn't be required, and it risks greatly reducing the number of supported browsers.

Using a complicated framework also makes it harder to use a website in any way other than the one that the developer was thinking of. It's unfortunately common for sites to break for users who navigate using only the keyboard, as they were tested only with the mouse and built in a way that requires additional work to make the site "accessible" (i.e. usable for all users) — even though with plain HTML and CSS and a smattering of JavaScript, you often get this for free.

This is probably the most boring, generic blog post that I'm going to write here, but that's because it's a message that bears repeating over and over and over again: don't use a tool just because it's the cool new thing to use! There may be something better for the job, which will consume fewer resources and allow you to build your project faster, while being easier to use for a large subset of your users. Don't overcomplicate things!