DEV Community

Discussion on: You don’t need React for building websites

 
ravavyr profile image
Ravavyr

Gonna try to respond to each of these:

I agree, we shouldn't write EVERYTHING from scratch, but A LOT of npm packages are 5 lines of code that anyone CAN write and understand versus install and have no clue what it's doing.

WE CAN write modern web applications without a multitude of dependencies. indiegameshowcase.org is fully vanilla JS SPA [The frontend has tinymce, the rest is just javascript] with a NODE backend.

The backend has only the following dependencies:
"dependencies": {
"@pm2/io": "^5.0.0", [for logs]
"aws-sdk": "^2.962.0", [for file uploads]
"dotenv": "^10.0.0", [environment files]
"email-validator": "^2.0.4", [validate emails]
"express": "^4.17.1", [actual server stuff]
"express-blacklist": "^1.0.3",
"express-defend": "^1.0.9",
"express-rate-limit": "^5.3.0",
"express-session": "^1.17.2",
"mailersend": "^1.1.0", [send legit emails]
"multer": "^1.4.2", [upload files]
"mysql": "^2.18.1", [database]
"password-hash": "^1.2.2" [secure passwords]
}
I don't think it could be done with less without recreating a TON of code.

"Do one thing and do it great" is nice in theory, but in reality it causes far too much abstraction and you end up with 20 libraries written by 50 different developers and it's all code you don't understand. More often than not you can write the same functionality easily, but newbies don't know so they pile them on and you get a 15MB bundle. Google "React bundle size" and look how many articles are there just to tell people how to reduce it by removing crap they don't need, or worse, install more libraries to do it.

Linters make developers lazy because they stop understanding how to debug their code, and really most of the stuff linters do is pointless crap like "80 characters per line" or "new line at end of file" or "remove semi-colons"....like none of these things improve your code and basic syntax errors already show in VSCode and other editors.

Linters also do not teach you accessibility, they have automated rules you can follow, but this only does part of it. People think accessibility is just code rules, but there's an "experience" that you need to build for accessibility and that's 75% of it that most devs using tools for it, don't accomplish correctly.

Gatsby doesn't set up everything you need for SEO, and it's another package you install that you don't have a full understanding of, which isn't necessary. [Gatsby of course is useful for other reasons]

You don't have to agree. This is just my opinion from years of working with other people's code.