I would like to know why it's so much better? I hear you on speed but is it really that much faster that in this day of fast networks that one would really notice that much? What is tye best use case scenario?
That's the wrong question. That's like asking why ASP.NET is so much better than coding pure C# and handling all of the HTTP-stack and template parsing and such yourself. Using React is better from a developers point of view. It makes certain abstractions and decisions for you. And that's what makes it better.
I decided to not use a JS-framework in my last project because I was on a deadline and figured that I didn't have time to learn something new... Now I'm in jQuery hell :/ I would almost certainly have gotten a better result learning, and using, a framework like React/Reflux/dux/lux/*ux or Angular or Aurelia.
Frameworks are everything but better than Vanilla. They are just tools, created for certain purposes and some of them then are over-hyped (especially React). Please stay calm and choose the right tool for the right job. If you want to build a Facebook, then React is a good choice. If you want to build a Dashboard, Aurelia might be the right choice. If you build a stupid homepage, Vanilla should be the first thought.
I recommend reading this comparison Hashnode Original Article about finding a good balance!
Who told you that? Better how? React and other frameworks are worse, more complicated, useless and slow. This is how modern society with whole marketing is manipulated.
People see that "speedup" in case of those "frameworks" only because they have 0 knowledge in software engineering and architecture and can't build an app themselves, they need nanny to tell them what folders and files to create and where to put them. Whenever I teach web development, I always start from the basics of software engineering and architecture and showing different ways building software from scratch.
The only use-case scenario I see is learning for beginners, so there would be some examples for them on how to structure app, what is a N-tier architecture, what is a component-based architecture, what is MVC / MVVM etc.
Nothing is better then the only and mighty 3 pillars of the Web - HTML, CSS and JavaScript (and always and only in that direct order, many people forgot that also and start directly from JS and doing a huge mistake)
You are wrong. Frameworks aren't faster than JS (VanillaJS).
React and other View-Render-frameworks have an advantage in rendering views because of the use of a "virtual DOM". The real DOM only had to render the changes in view and not the whole view like you would do with (worst case) .innerHTML.
So the use case of this frameworks are pages with a lot of rerender operations (like twitter or facebook).
Most pages don't need something like React. You can implement a loot of that stuff by yourself.
john
"Code Or Bust"
john
"Code Or Bust"
Ivan Bernatović
Full stack web developer
Answer to question
Speed is not the reason React and other frameworks are used today.
I'm getting sick of these questions and one sided answers so I'll try to give an answer from neutral perspective that reflects real world. This is not only "React vs vanilla", this is "framework vs. no framework" answer.
Framework vs. no framework
Definition of framework from Wikipedia page: A software framework is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate development of software applications, products and solutions.
Why we use framework?
Software development got complicated. Requirements are harder, apps are bigger (codebase wise and feature set wise), you have to implement more things in shorter time than 10+ years ago. Every person solves problems differently even though some problems really have one best solution. Frameworks solve that kind of problems and offer abstractions which we can use simply and without losing additional time to solve it ourselves. Also, frameworks impose their own architecture and workflow which reduce number of choices YOU have to make. That also enables companies to easily incorporate new staff into their projects, they can be more productive in no time which in the end means more money.
Do frameworks have technical advantages over custom solution?
It depends. In most cases they are worse in performance than a custom solution. But they are also much more stable since in most cases they are developed by multiple developers in longer period of time, and tested on real life projects. And often they use smart design patterns to solve problems more efficiently. So basically, good frameworks are stable, secure, feature rich and more maintainable than usual custom (or vanilla) solution.
Is most popular framework at given time best option to learn?
If you want to get job faster than yes. However, like some people already said, many of popular frameworks are hype because Facebook/Google/whatever is behind them. They are not technically superior than alternatives but they got a backing from a big company and have a large community which means many tutorials and answered questions on Stack Overflow.
Having said that, are certain frameworks overused?
Absolutely. Read this.
Learn basics first, but don't ignore the world
@mevrael is one of the people on this site that push idea that you shouldn't start using frameworks if you don't completely understand how they work. I can't agree with that since it's too idealistic to be possible. As a beginner you should learn basics of programming language and environment you are developing for, but it is not possible to learn some stuff before working on real life projects. You can't understand design patterns if you don't have proper context of them. Same goes for almost anything. What I want to say I don't think is possible to learn ALL THE BASICS without using more sophisticated architecture that frameworks have. Understanding how stuff works and why is your major goal as a developer in general, but it can't be your first goal. First goal is to have some understanding and be productive. As you learn and gain experience you will explore things you couldn't understand in the beginning. And this is real world, clients have demands for certain technologies and frameworks, they have expectations and limited patience. Also, we all have limited time and motivation so we have to be productive in order to stay motivated and earn something for a living.