r/javascript • • Dec 04 '20

No One Ever Got Fired for Choosing React

https://jake.nyc/words/no-one-ever-got-fired-for-choosing-react/
322 Upvotes

242 comments sorted by

View all comments

93

u/VickyRelease Dec 04 '20

Haha, cute title. It's pretty spot-on. Look, I'm a Vue girl, it's superior to React in every way (fight me) but the truth is the widespread adoption isn't out there to the same degree. Which mostly means if you're looking for a supportive library, you have slim(mer) pickings.

React has the opposite problem. And the same problem, kind of. There's too many choices and a lot of them are garbage or incompatible with the version of React that you're using.

But people trust React. Big companies are using it heavily. It's an easier sell to management. It's easier to sell it to yourself. I'd wager to guess that React devs even make more money than {other JS framework} (there's definitely more market demand for React).

64

u/Tyreal Dec 04 '20

The better technology isn’t always the technology that wins. It all comes down to several factors including marketing. React is not perfect but it’s got all the support behind it.

Kinda like JS, there were/are better languages but you know what they say, there are the languages people complain about and the languages nobody uses.

→ More replies (3)

29

u/secret_band Dec 04 '20

Thanks! I think if you’re happy and productive with Vue, then stick with that. Point of the post isn’t that React is “better”, but to just to use whatever you can be productive with, rather than chasing some notion of efficiency or technical purity.

11

u/VickyRelease Dec 04 '20

That's very true. I've attempted to branch out, but often it comes back to "Well I can just get this done 10x faster, and probably better, if I use the tools I already know". My inner engineer isn't always happy with my choices and conflicts with the pragmatist in me, but I try to let that pragmatist win because, I mean, theory is one thing and in-practice is another. ¯\_(ツ)_/¯

30

u/dfltr Dec 04 '20

Yeah, I call that Grown-up Architecture, aka wistfully googling “Rust api framework” then opening your terminal and firing up a headless Rails project.

12

u/ravepeacefully Dec 04 '20

I feel attacked

4

u/VickyRelease Dec 04 '20

I love this. Painfully true.

→ More replies (1)
→ More replies (1)

0

u/[deleted] Dec 04 '20

[deleted]

9

u/yungcoop Dec 04 '20

dev/community support is also important imo, there is probably more written on stackoverflow, medium, etc about react compared to vue. fits in with the idea that the well trodden path is generally a safe one.

7

u/[deleted] Dec 05 '20

Could also be that in VUE things just click, they make sense and thus people rarely have any questions outside of what the docs already cover? This is what I felt about VUE

→ More replies (3)
→ More replies (2)

7

u/Mestyo Dec 04 '20

Can you point me towards some good high-level Vue resources? Everything I find seems to be tutored towards beginner developers. I have to use Vue for work, but any time I try to write data-driven or functional code, some random quirk in Vue makes it borderline impossible.

It seems to be designed for static, imperative approaches and it's driving me insane—I want to write neat, performant, and reusable components, but I don't understand how to.

→ More replies (2)

32

u/geon Dec 04 '20

I used vue on a project. I hated it with my spirit, soul and body. So much magic and shitty javascriptisms.

React I can reason about. At least when functional.

But you do you.

9

u/VickyRelease Dec 04 '20

That's pretty interesting, I have the same problem but in reverse. Vue works exactly like I expect it to, it's very, very predictable to me. Vuex is <3 I've found with React it's too easy to write bad code. You have to constantly babysit PRs for code consistency and performance and have meetings on dos and don'ts.

16

u/kdesign Dec 04 '20

Bad code is just that, bad code. A framework won’t save any team from it. Honestly I’ve seen awesome and horrible code in: Angular, Vue, React. I’ve been sticking with React for a couple of years now simply because React Native is a huge selling point to me. Transferable skills from web to native mobile apps.

10

u/VickyRelease Dec 05 '20

I don't exactly agree. I mean, I agree that you can write bad code anywhere at any time, but frameworks are specifically structured systems that contain good practices in "how" your application should be set up and a good framework is difficult to break out of. Spring Boot, Ruby on Rails, .NET, etc are still widely adopted because these frameworks make it clear that there is a "right" way to do things and a "wrong" way. You can jump into a codebase that you've never seen before, hitting the ground running, because you know how these puppies work. React and Vue technically aren't frameworks, but Vue definitely leans closer to being a framework than React.

→ More replies (1)
→ More replies (1)
→ More replies (1)

5

u/maxoys45 Dec 04 '20

I've just started learning Vue and have added Vetur to VS Code but when writing components, it's not auto adding closing brackets or indenting properly, it's making it incredibly tedious to write as i'm constantly having to fix the indentation of markup/js/css - am i doing something wrong? (Vue 2 if that matters)

4

u/terminalcoder Dec 04 '20

I experimented with Vue for awhile and ran into similar awkward issues. I recommend giving Sveltejs a try, it's really quite a remarkably effective framework.

2

u/DOG-ZILLA Dec 05 '20

Try using Prettier? That’s kind of what Prettier is for. Vetur is to give you more intellisense in your IDE.

→ More replies (1)
→ More replies (2)

9

u/pninify Dec 04 '20

One big problem is developers stating strong opinions like this and not being willing or able to talk in details about why they think that. In years I haven’t seen a single strong argument for either Vue or React being better than the other, just a lot of opinions elevated to fact. It would serve these kinds of conversations a lot better if devs with strong opinions could get into why they hold their opinions rather than why Vue or React fitting with their existing opinions makes either framework “better”.

9

u/[deleted] Dec 04 '20

I came to prefer React as things like mapping are done using the native language, whereas at least at the time Vue had its own proprietary mechanisms. I don't know if that's changed.

5

u/xwp-michael Dec 05 '20

Same. I originally looked at React and thought Vue looked much better. Did a project in Vue and I didn't like it.

Gave React a try and it just clicked. I find it just so much better, personally.

→ More replies (1)
→ More replies (1)

9

u/ShortFuse Dec 04 '20

You should know React well enough to know when not to use it.

It's a problem in the JS community where everyone throws a framework or library at everything. Dependency hell is real and people don't understand it until they start working enterprise.

10

u/xwp-michael Dec 05 '20

I really need to show the users what time of day it is.

npm install moment

Perfect!

→ More replies (1)

2

u/Entaroadun Dec 05 '20

It's not just that, but it's easier to find Talent for React. That's huge for any growing team or company that wants to grow.

2

u/mattaugamer Dec 05 '20

it's superior to React in every way (fight me) but the truth is the widespread adoption isn't out there to the same degree

Then it’s not superior in every way, is it? :P

→ More replies (10)