I just started to learn react and I was making a simple Login form with it.
I was thinking to make it similar to the one I had made before and it seemed very much simpler with plain old HTML and CSS.
Even though the styling is similar to follow, it's very much simpler in plain CSS. Just add text to classes instead of searching for the style in one of the many files.
If it's only a static website, for instance a blog or your personal portfolio, HTML & CSS with a couple of vanilla JavaScript functions is fine. However, once you add complexity to your application, by using more than a couple of utility JavaScript functions, there needs to be some kind of "framework" to organize your View and Logic. React is used when it comes to organizing your view as components, and JavaScript ES5 and beyond is doing the rest by adding the necessary business logic. That's what makes React so great in the end, because most of it simply stays plain JavaScript [0]. React is only the view layer by organizing your application in components.
In case you are interested, just recently I had written down my thoughts [1] on this questions for people learning React, Angular or Vue nowadays, but questioning why they should learn it in the first place.
- [0] https://www.robinwieruch.de/essential-react-libraries-framew...
- [1] https://www.robinwieruch.de/why-frameworks-matter
Frameworks are useful to standardize how many developers in a single project develop together. It also eases binding dynamic views to datasources (databases or API:s or similar). And as a third i'd say that many of the everyday "gotchas" are sorted out in mature frameworks so the developers can focus on the stuff that actually matters.
I am - on the other hand - one of those who argue that frameworks also bring a lot of evil into development. Especially in JS where frameworks are built on top of frameworks which are built on top of frameworks. But I wont bring out those arguments here since the question was "Why to use frameworks" not "Why to avoid them".
Happy Hacking!
If you are solo and your application is going to be small they are probably unnecessary. If you are learning or already know how to use a framework, then it helps in the long run by taking care of lots of things to make your life easier.