I don't use JavaScript frameworks like React, Vue, Svelte, or whatever else is trending these days. I've always stuck with vanilla JavaScript.
I like to think I don't use them for these reasons:
- They take away control
- They add complexity
- They take time to learn
While this article is focused on JavaScript frameworks, the same applies to CSS frameworks and dependencies in general.
By using a framework or library of any kind, you're giving up some control. If the framework has a bug, there's not much you can do unless you're brave enough to edit its source code. You're giving up control.
Whenever I'm coding a team project with a JavaScript framework and we need to add a feature that the framework can't, I'm usually the one coding that feature. Because my team doesn't know vanilla JavaScript.
I think it's slightly concerning how programmers these days are learning high level frameworks before the low level languages that power them. Like learning React before JavaScript.
I learnt C before Python, so picking up Python was easy, because I knew how everything worked under the hood. But I see people go the other way: start with Python and try to learn C. And they really struggle.
Frameworks add complexity to your project. It's an additional dependency that you need to manage—keep up to date, make sure it plays well with other dependencies, etc.
There's been times I've stumbled upon dependencies that will quickly and easily implement something I need. But still, I've chosen to code my own solution, which will always better fit my project and contain less bloat.
Case in point: I made my own static code demo component instead of using CodePen.
While JavaScript frameworks might make you a faster programmer after you learn them, I find the time it takes to fully master one is more than the time it takes to code the project in vanilla JavaScript.
There are times where I'll be doing something on my own and think: "Wait, X framework can code this 10 times faster!"
But I've always chosen to use my own solution because, on top of giving me more control and filling my project with less bloat, I don't have to spend hours learning the framework.
Funnily enough, I ended up coding my own screenwriter because I didn't want to have to learn a new software. Not the same as learning a framework, but it goes to show my train of thought.
I do see the value of frameworks, libraries, and dependencies. There are some well-maintained unicorn projects out there that I 100% use. Like Wordpress, SQLite, etc.
But for the most part, I like my projects to be functional on their own. So I try to avoid depending on other projects. Maybe that's just a me thing.