Laurie Voss: As with any popular phenomenon, it’s hard to pinpoint a single cause, and a combination of factors have combined to fuel React’s growth.
First, it is a neat and effective solution to an extremely hard problem: making modular front-end components that are portable, reusable, and interactive. They were not the first and not the only solution to that problem, but the ergonomics for developers are arguably better.
Second, having the backing and considerable marketing might of Facebook behind it has given it an audience few frameworks can match, and the fact that Facebook uses it and supports it gives a lot of devs confidence that it’s something they can invest in.
But of course, the underlying cause behind both of these is the continued march of web applications to ever greater levels of richness and usability, which drives complexity behind the scenes. React helps manage that complexity while allowing teams to keep up with the pace of work demanded of them.
JAXenter: According to the results, Preact is also on the rise. What is its biggest advantage? Does it borrow something from React’s “fame”?
Laurie Voss: Preact’s biggest advantage over React is performance. It is a much smaller library, which makes it faster to download and quicker to execute. It bought this speed by abandoning support for some older browsers. Facebook needs to support a wide range of browsers, but users of Preact are okay with not serving those users.
React also has much better debugging tools than Preact, so some developers use React in development and Preact in production. Since the two are as close as possible to identical, this is feasible.
JAXenter: What front-end framework would you choose? Would you also bet on React like most respondents or would you use something else?
Laurie Voss: npm’s own website is built in Preact in production, using React in development. So we’ve definitely made our choice, though to some extent that was driven by React’s popularity with our users — we like to have the same problems as our users, since as a developer tool that focuses us on solving them.
SEE ALSO: Year in review: Angular in 2017
Some developers use React in development and Preact in production.
JAXenter: Angular still has a lot of fans but, according to the report, its popularity is not increasing. What does this mean? Do you think Angular’s glory days are over?
If you’re a new developer in 2017, all of the publicity is around React; blog posts and conference talks are about it, and it’s what gets taught at coding bootcamps. If you’re going to pick one framework to start with, the sensible one to pick is the one everyone’s talking about. This is part of why web development often seems so “fad-driven”: it’s still a young discipline, with new developers arriving all the time.
In terms of “glory days”, it’s too soon to tell. Ember managed to reverse a slide in its relative popularity, so if Google makes a big PR push in 2018, Angular could too. But if nothing happens, it will probably continue to lose ground to Vue.
JAXenter: Speaking of that, can Vue overtake Angular in 2018? What fueled its unexpected popularity?
Laurie Voss: From my perspective, there are two factors driving Vue’s growth. First, lots of developers still want a “soup to nuts” framework, i.e. one that does everything from routing to templating to back-end data fetching. Vue does this, which tends to make it easier for a first-time developer to pick up since they just make one choice: use Vue, and all the other choices are made for them.
React, on the other hand, requires making lots of additional choices about routing and data management libraries, which makes it more intimidating and slower to get started with. So Angular, Ember and Vue all have this “all-inclusive” advantage over React.
Second, if you’ve decided you want an all-inclusive framework, Vue performs better in benchmarks and is relatively easier to learn. Although these things are subjective, devs often report that it feels “cleaner” or “simpler” than older frameworks like Angular and Ember.
If nothing happens, [Angular] will probably continue to lose ground to Vue.
JAXenter: What has radically changed from last year and why?
This means npm has had to take security and stability a lot more seriously, addressing things like typo squatting and spam packages, as well as securing npm accounts with two-factor authentication.