Preact is objectively better than React. It is React with significantly less kilobytes (more than an entire jQuery's worth!) and marginally less suck.
Big companies have shown its viability, so why does React still exist?
Does anyone in the React community know why?
Top comments (9)
I would say because of the community. React has a lot more support and a lot of companies implementing React also want to "stand someone behind" a solution. Everybody knows Facebook and therefore it's more preferred to use React than from unknown contributors (i don't share this opinion)
Yes, I think that's the biggest reason. I don't think companies or individuals actively try to be independent from everyone and choose the best technology rather than the most popular. People often prefer to follow what others are doing. I also wouldn't necessarily say that Preact is objectively better than React: they're two different frameworks with slightly different features, different ways of doing things, different priorities and, ultimately, different future. We can compare the two frameworks, but someone will still say that React is better, maybe because it's doing more things, or because it's doing things with async fibers or whatnot, or because they like that "onChange" really means "onInput", etc.
It's the herd phenomenon.
React was clearly way faster than Angular (the old one), back in the days Angular was the ONLY reasonable front-end framework. Everybody built websites using Angular, because that was almost the only option, and everybody knew that it had performance problems. Then came the "super-fast" React. And guess what, It was way simpler to work with.
Web-View based apps on mobile devices were not that common, so nobody really cared that Virtual-DOM is a battery consumption, and React forces you to work with
keyed
elements, but their key implementation has memory leaks nobody deals with since the day it was released. Nobody cared that JSX is actually a runtime, js-parsing, and memory bloats and also forces the garbage collector to work all the time.But everyone is already on that train, so they keep going. It's the HERD that leads the way, not the common sense.
Yeah, I'm afraid you're right. I've never seen anyone articulate why they choose React and not Preact. Like Michael said, people feel more comfortable because it came from Facebook. That makes me less interested (Preact was created by one guy and it's objectively better)
IMHO, for the standard web app, the difference is minute, and I'd prefer being under the giant umbrella of React and it's ecosystem.
When it comes to web sites though there might a bigger appeal to preact (I actually believe some of DEV is written in preact).
And I believe most companies aspire to build complex web apps over web sites.
I don't follow. How are you defining app and site?
There isn't a clear cut and dry difference, but I'd say that a blog is probably a web site, but something like GitHub is a web app.
It comes down to the level of interactivity and complexity I guess.
Ok, that's what I assumed. I still don't see why devs building apps would favor/benefit from React over Preact. The issues with React affect apps just as much as sites.
How will I be able to know all these when the government of where I live "Nigeria" is killing techies!
Techies in Nigeria Are Not Safe Again In The Hands of the Government
Hammed Oyedele ・ Oct 20 ・ 1 min read
Some comments have been hidden by the post's author - find out more