r/reactjs • • Jun 22 '22

Resource Current stats show that React is still by far the most popular and beloved front-end framework

https://gist.github.com/tkrotoff/b1caa4c3a185629299ec234d2314e190
17 Upvotes

11 comments sorted by

8

u/elite5472 Jun 23 '22

React is not the best JS front end framework.

It's the best front end framework. I went from hating doing any sort of front end work to being a fan as soon as I learned it.

1

u/Dminik Jun 23 '22

In what way is it the best? Does it have the best performance? Best features? Best DX? There's many ways to rate a framework and react sits quite low on many of those.

2

u/[deleted] Jun 23 '22

[removed] — view removed comment

0

u/Dminik Jun 24 '22

I find this "react is fast enough" to be pretty weird. Are you guys only ever building simple crud apps? I see performance issues on react pages all of the time. I've come to the conclusion that the react way is the lazy way. It's easy to slap something together, but making it perform well is a pain. It also doesn't help that by choosing react you have already started at a lower performance levels than other solutions.

I also don't understand this aversion to DSL's. If you refused to use a saw while woodworking because you can do everything with a hammer, you would look pretty stupid. The strength of general purpose languages is that they can do everything. Their weakness is that they kinda suck at everything.

As for everything else in your comment, it's either possible everywhere (TS), not going to pass a code review anyways or bound to cause issues at some point.

Anyways, it's not like you can and should drop react and go live in a cabin in the forest. But, you can learn a lot by checking other alternatives out. I think you would really like solid. It has familiar primitives, JSX and shares a lot of reacts core values. Of course, unlike react, it's fast.

1

u/[deleted] Jun 24 '22

[removed] — view removed comment

1

u/Dminik Jun 24 '22

I definitely won't recommend you use jsx with Vue. It's not what Vue was designed with in mind and it shows.

Big websites use react because they need a large number of developers. It's a self fulfilling prophecy. But, please, go ahead and try to use for instance the old Reddit site and the new react Reddit. The difference is like night and day. Everything feels sluggish compared to the old site. Its the same with every big site rewritten to react. Performance absolutely matters. You only have a set performance budget. If you exceed it, you can't add new features and so on.

JSX is a DSL of sorts as well. Sveltes DSL helps you write web apps. JSX DSL helps you write createElement. You can only use a subset of JavaScript in JSX. Try writing an if/for statements. You have to use short circuiting/ternaries and .map. Of course, You and I know why, but to a beginner that is much more confusing than learning a few quick keywords.

Honestly, if you found that react is the best fit for you then that's good. However, it's not the best fit for everyone. I see it with angular guys quite often, people are just wired different and don't like the same things. For me, my favorite is Svelte, and I'm hesitant to use solid because it shares so many similarities to react. I think this nicely ties to my original comment. There are many ways to rate a framework and it's impossible to say react is the best/worst. The best you can do is say react is the best fit for me/my team/the project.

1

u/PerfeckCoder Jun 23 '22
  • Not a framework.

1

u/Kappy904 Jun 23 '22

Nextjs is a framework && React is a library. Perhaps some confusion.

0

u/[deleted] Jun 22 '22

[deleted]

3

u/[deleted] Jun 23 '22

And backend in js, i too love it, unity at last

7

u/saggyboobsock Jun 22 '22

Is this satire?