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

Show parent comments

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.

1

u/kdesign Dec 05 '20

That’s if somebody chooses to use that framework the way it was intended. In React, just like with any other framework, if you follow their conventions then you’ll be fine. I used to do .NET, I saw views with logic in them (business logic) and controllers with lots of code and data access. I’ve also seen super thin and dumb views, controllers with small and concise methods that were only calling a repository which was in turn communicating with the data access layer. That doesn’t mean that .NET itself doesn’t have best practices. It has, but it’s up to its user to get acquainted with, and follow them.

3

u/[deleted] Dec 05 '20

Vuex IS <3

It’s been a while since I touched the react world, and I mostly use angular these days, but holy shit is Vuex the best state management solution I’ve used. It’s so stupid simple and “just makes sense”.

Not sure if you’re interested in angular, but the most common solution (NGRX) is literally water torture when you’re coming from Vuex.