r/javascript • u/secret_band • Dec 04 '20
No One Ever Got Fired for Choosing React
https://jake.nyc/words/no-one-ever-got-fired-for-choosing-react/167
u/everythingiscausal Dec 04 '20
The phrase maybe has some sarcasm behind it, but I agree with the idea. If you use some obscure framework and shit hits the fan, people are going to want to know why you’re using software that’s not as well supported and battle-tested as a free and prominent alternative. Not having to worry about that counts for something.
It just so happens that I like React the best of the frameworks I’ve tried anyway, so that’s a perk.
6
u/AlfredVonWinklheim Dec 04 '20
React is fine but flux makes no sense to me. I fight with it every time I have to re-learn react.
43
u/Peechez Dec 04 '20
redux toolkit and never look back
22
6
Dec 04 '20
Redux is a piece of shit. So much boilerplate. Context is so much simpler and easier to maintain.
40
Dec 04 '20
You should check out Redux toolkit. It's rare to see a library take its criticism so well.
49
u/acemarke Dec 04 '20
Thank you! This is literally why I created Redux Toolkit :)
https://blog.isquaredsoftware.com/2019/10/redux-starter-kit-1.0/#dealing-with-complexity
Happily, we've gotten a ton of feedback from very satisfied RTK users with comments exactly like this one :) That includes people saying "I used to hate Redux, but RTK made me love Redux again" (near-exact paraphrase of actual responses I've gotten)
On a similar note: we just published the first alpha of "RTK Query", a new data fetching and caching addon built on top of Redux Toolkit:
https://rtk-query-docs.netlify.app/
Would love to get some folks trying it out and giving us feedback on the API design and use cases.
Once we're happy with the API and feel it's ready, we'll merge it back into RTK itself.
5
u/USKillbotics Dec 05 '20
This really is a great library. I've used it daily as long as it's been out.
3
Dec 05 '20
I’ve been meaning to jump back into the react ecosystem ( I mostly work with angular and the last time I touched react was before hooks... lol) and this sounds awesome. Thanks for the hard work!
2
2
u/monkeysaurus Dec 05 '20
Personally I used to hate Redux, but RTK made me love Redux again. Thank you for all your hard work on it.
2
u/DrummerHead Dec 07 '20
What are you personally using for async actions? Thunks or something more hefty?
I think that's the step I haven't taken yet with Redux, to explore something other than thunks for async actions. I think thunks are a sweet middle spot between simplicity and getting the job done, but they also give you "too much freedom" and maybe there's a better way.
2
u/acemarke Dec 07 '20
I use thunks as the default:
As you pointed out, thunks are basically the simplest approach code-wise. "Here's
dispatchandgetState, do whatever you want with them". There's been a number of folks in the past who have expressed concerns about thunks giving you "too much freedom", and I specifically wrote a post a few years back addressing those concerns: Thoughts on Thunks, Sagas, Abstraction, and Reusability.Having said that, the RTK Query addon I linked above is specifically intended to eliminate many of the cases when you would have needed thunks in your own code, by abstracting data fetching logic completely. (Which, I will point out, is entirely built with thunks internally :) )
3
u/GBcrazy Dec 05 '20
Thanks for that comment, I was really out of the loop on this one. I may even start liking redux again
Just took a quick look at the docs and that sounds awesome
4
u/mattaugamer Dec 05 '20
We recently stripped out a fuck-ton of data handling Redux and replaced it with React-Query. Would recommend. Really simplified our data loading patterns.
→ More replies (2)1
Sep 05 '23
It's a common misconception to think that the Context system is an alternative to Redux. The Context system was meant to solve the problem of communicating data going from the parent to the child in a situation where components are heavily nested. So its about communication, not a replacement for Redux. So any arbitrary parent can communicate with a nested child component, that's all.
0
→ More replies (1)3
1
u/yojimbo_beta Mostly backend Dec 07 '20
The problem is, every so often you are wrong. Disastrously, eye wateringly wrong.
I saw it happen a few years ago in a previous gig. There, I was a relatively green developer, and I was trying to push a new UI library with an interesting approach to templating and a totally new DSL. My proposal was shot to ribbons: the tech was new and strange, it appeared to mix disparate concerns, there wasn’t enough in the way of well proven use cases.
You can guess where this is going: the year was 2014 and the library was React. The org chose Knockout.js instead and still uses it throughout their stack. They are struggling to hire developers and was probably one of the biggest mistakes they made on the frontend side.
If you go for Proven Solutions, then four years out of five you will pick a sensible standard. On the fifth year however you will pick a Knockout.js
1
0
Dec 04 '20
[deleted]
10
u/mattaugamer Dec 05 '20 edited Dec 05 '20
I’ve been the picker a few times. It’s not a fun conversation to try and justify why you’re using this obscure bullshit instead of industry standards. Especially when you’re standing over its smoking corpse.
3
2
0
10
u/zmasta94 Dec 04 '20
Worked with Angular.js, Angular, Vue and React
My choice is React (even Next.js these days). But if I’m building anything that’s form-orientated (admin dashboards etc) my preference swings towards Angular/Vue
5
u/jaemx Dec 05 '20
Have you tried https://formik.org ? The combo of that with Yup for validation has been a massive help on my team’s recent projects
2
u/zmasta94 Dec 05 '20
Yes as recommended by the React docs too. It’s nice(r) but still a bit more fiddly than Vue/Angular when you just wanna put something together quickly for CRUD operations against a database
3
21
u/samanime Dec 04 '20
I'm curious why he used lit-html then decided he needed a framework and didn't try using lit-element/Polymer which IS a framework (using lit-html as the render engine) and pretty much feature-parity with React.
I find it is also much better at handling things that update a lot without having too many re-renders.
7
u/llldar Dec 05 '20
Believe me I used lit-html and polymer at work before, they are so much painful to work with compared to react. The toolchain is old so you would end up reinventing a lot of wheels and stuck in a nightmare of maintaining ancient wheels instead of benefitting from the open source world.
1
u/samanime Dec 05 '20
I can't really comment on the out-of-the-box toolchain. I don't use either Polymer or React's toolchains, as they both have issues that annoy me, just the code libraries and then I have my own rollup-based toolchain.
The nice thing about LitElement is literally all you need is to pull in the lit-element module and you're good to go. No other required dependencies.
Also, not sure if you used the older Polymer 2 or earlier. I've never used those, but just looking at the docs I come across for it occasionally, looks like it was a lot rougher than the current version.
2
u/Arve Dec 05 '20
I don’t particularly like react. If I was hiring for a project I brought to the “functionali prototype” stage that I wanted to productize, I would go for React, because I would have a much larger pool of competent developers to choose from.
I could very well prefer something else over it, but it hardly matters if you want to build a product in a decent timeframe.
2
u/samanime Dec 05 '20
That's a good point. I personally never hire based on framework or even language knowledge. I'm a very senior developer who is perfectly fine ramping up a competent dev of the required skill level on the technical particulars of whatever we are doing.
But, that is a luxury not ever company has due to time or having a person like me willing and able to help ramp someone up. If I was forced to hire for a framework, looking for React devs would definitely be much easier.
Though honestly, LitElement is so similar to React, the transition period is like < 1 week, you could still hire a React dev for a LitElement project. You can really tell that LitElement was basically made by a bunch of ex-React devs. It kept all the things I liked about React, fixed a few of the minor annoyances, and brought in Web Component goodness.
3
u/Caffeine_Monster Dec 05 '20
never hire based on framework or even language knowledge
A refreshing view. A competant dev can translate their existing knowledge to a new language quickly. Most of it is syntactical sugar.
1
u/samanime Dec 05 '20
I've been using that approach for the entirety of my 10 year professional career and not been disappointed once. I've also applied for plenty of jobs, gone in and said "I don't know this tech stack" show them what I do know and still got offered jobs too.
At the junior level, being able to think logically and being willing and able to learn.
At the mid-level, you need the above plus technical knowledge (such as design patterns) to be able to quickly translate solutions into code.
At the senior level, you need the above plus have an overview of what technologies are out there (like types of databases and what each is good for) and how to put them all together to create advanced solutions. Even at the senior level though, you don't have to master it all. Knowing what tools are available is important. You can always learn how best to apply those tools as you need.
1
u/antoniofreire Dec 11 '20
I understand your approach and view, however, for example, I never met a Frontend Developer dedicated to React who actually enjoys working with Angular. It's a path of misery and unhappiness so IMO, in order to fulfil everyone's expectations, you should take in account the Developer preferences when hiring - it will eventually determine the amount of compromise and dedication he will commit into the product.
→ More replies (1)
3
u/NinthTide Dec 04 '20
What are your thoughts about Angular? I haven't looked at Vue/React
6
17
u/superluminary Dec 04 '20 edited Dec 04 '20
The nice thing about React is that it’s idiomatic functional JavaScript. When I use it, I don’t feel like my JavaScript skills are eroding.
Angular is the opposite. Everything is bespoke. If I wrote Angular for five years and Angular disappeared, I suspect I’d be unemployable.
5
u/Isvara Dec 05 '20
Why would writing Typescript instead of JavaScript make you unemployable?
6
u/superluminary Dec 05 '20 edited Dec 05 '20
It’s nothing to do with Typescript. Typescript is just JavaScript with types. Everyone uses TypeScript now.
I would prefix this by saying that I don’t hate angular. It has its uses, and I do recommend it to clients who have certain specific team structures.
When I write a React component, I’m writing a function that returns DOM. My application builds is a nested array of simple functions. If I want to pass parameters it’s simple, my component function receives a parameter. Events are the same. I just pass a function as a parameter and we let closure take care of the rest. If I want to iterate over an array, I just Array.map it into a new array of DOM nodes. It’s all plain, transferable TypeScript. The only special pieces are the createNode function that creates the node and the render function that updates the real DOM.
Contrast this with Angular. A component is a class decorated with the @component decorator. What does @component actually do under the hood? You don’t need to know. It’s specific to Angular, you can’t use it anywhere else. How do I pass parameters? That would be @input and @output. How do I iterate over an array? That would be *ngFor=“let item in items”. If I want to use anything I have to make an angular.module. Why? To take care of singletons and DI. But doesn’t ES6 already have a module system that handles singletons for us by default? Isn’t overriding a service for test as simple as doing as second import in the test file?
None of these skills are transferable. Google has tried to recreate Java in JavaScript and in so doing has built a new GWT.
React is JavaScripty, it understands the language and uses its features. Angular is Java-ish. It fights JavaScript every step and reimplements core language features like modules to make them fit a classical mindset.
I’m not saying that Angular is bad BTW. I actually recommend it where you have Java coders who want to work on the front end. It does scale quite nicely and it’s welcoming to people coming from a classical language who don’t want to learn functional coding. As a front ender though, It is a dead end for your career.
4
u/Isvara Dec 05 '20
You're just talking about the presentation layer. You still have the entire rest of the application to write, which is all just Typescript. In order to forget how to write that, you'd have to be writing applications that don't actually do anything.
1
u/superluminary Dec 05 '20
Perhaps I should take another look. It’s been a couple of years since I built anything real with it.
1
Dec 05 '20
Idk if I’d go all the way to saying it’s a career killer. In my area the available jobs are almost equal between react and angular, with smaller companies Being more likely to use react and enterprise more likely to use angular.
2
u/superluminary Dec 05 '20
But the point is that when React goes away, I’ll have spent the time writing sensible functional code. When Angular goes away, I’ll have spent the time writing framework specific templates and decorators.
React is a simple library for DOM manipulation. Angular is a complete framework.
I’m not saying Angular is bad, but it doesn’t lead anywhere. If I learn the Angular animation framework for example, I can’t transfer those skills to another framework later.
This is fine for backend devs who just want to follow a recipe and get some work done, but it’s not a great choice if you plan on specialising in the front end long term. It’s similar to the people who spent time learning Silverlight.
→ More replies (3)8
u/jsNut Dec 04 '20
This! React is just JavaScript, JSX is just calling functions, it's always been so clear to me. I hate all the template binding magic of other frameworks. Yes react does have plenty of its own complexity but it I've always found its something I was doing or didn't understand rather than the framework doing something weird that I didn't understand, I know which way round I prefer that
0
u/Berbatat Dec 04 '20
Meh. I did vanilla JS for years, and I used to think that way. But I'm restless, contrarian, and arrogant, so I picked Angular, because it was hard, and when it started clicking, I was like "Ooohh! So that's what all that fancy OOP junk is for. Wow."
13
u/BreakingIntoMe Dec 04 '20
You consider yourself a contrarian yet pick one of the most ubiquitous monolithic front end frameworks of the last 10 years, made by one of the biggest companies in the world. Super edgy!
→ More replies (2)0
3
Dec 05 '20
Angular is just JavaScript for the most part these days, all the library crap like custom for loops etc, from AngularJS are long gone.
It's main separator from others is the DI and class decorators.
I work on a lot of big data / logistics applications these days, and wasn't super sold in going back to angular. but I realize now that a combination like angular + material + formly are actually pretty good for that type of project.
Don't have to make too many ongoing tech decisions and can focus on the hard integrations and math + management and recruiting of large remote teams a lot easier. Finding slightly more senior dev's in the market is easier too.
In saying that angular has a whole host of other issues mainly around the kitchen sick bloat of being around a long time. But writing nice functional components in plain JavaScript is very doable these days.
2
u/superluminary Dec 05 '20
I do agree it has applications, and when recommending a framework I take account of team structure and ease of hiring. If you have a bunch of Java devs and you want them to work on the Front End, a classical framework like Angular is a good idea.
It’s also quite friendly for juniors since all the decisions are already made. It’s much more recipe based.
I’m not sure about the ease of hiring thing. I’ve always found it harder to find decent front end devs who want to work with Angular.
Don’t you still have *ngFor=“item in items”?
2
Dec 05 '20
Yes we find it harder to bring in younger developers with an angular stack.
I'm pushing towards vue but some of the projects are massive cloud applications with angular and spring.
Simply because of the nature of the work (loads of system integrations, loads of big math problems to tackle) it's easier to find older generation developers who are interested in those types of task over younger developers who are often bit more interested in the UI itself.
Yes some of the funny template syntax is still there, it's slowly being simplified with each release and the push towards smaller components mean writing template literals in the decorator a bit like reacts render method.
In the js/ts now most of those weird helpers are no longer used in favor regular javascript/typescript and bit of help from RxJS. Round 2 of angular development has begun to grow on me, but I probably wouldn't choose it for too many other scenarios.
10
u/nowylie Dec 05 '20
This doesn't seem to have anything to do with React. First the author attempted to go a path of no/micro framework and realised they would have to write the features they needed themselves. Then they tried to use a framework they were unfamiliar with.
Hot take: if you want to be productive, use the tools you're familiar with.
0
Dec 05 '20
[deleted]
1
u/start_select Dec 05 '20
It depends. I’m a greenfield developer. This is what people hire me for. I build frameworks for mobile and web, then I build your app.
It adds 2-3 weeks development time at the beginning, then I work faster by myself or with a team of 3 juniors than a team of 4 seniors working with material and bootstrap.
When all of your UI components are composed of your own reusable stuff, fixing everything usually means fixing one thing.
Just don’t do your first greenfield project without the support of other senior developers. And/or after doing it yourself a few times. Don’t risk other people’s jobs for it.
Greenfield development -> building your own application framework/library IS the way to write excellent, malleable, and easy to understand software..... but it’s not like everyone and anyone can just do that. You need experience to back it.
21
u/rusty_matador_van Dec 04 '20
Here I’m, meet my friend, Angular!
0
Dec 05 '20
[deleted]
2
u/rusty_matador_van Dec 05 '20
Projecting content in another component while keeping the references in the parent component, that too allowing what is really required is a great feature. Props.children gives away direct references which allows monkey patching. In larger teams monkey patching becomes nuisance. Other hand, using content projection we only listen to events, and display content in other component. If we really require the instance reference, allows access via content children, which again in rare cases. Clever pattern for me. Angular has many tricks like pipes, DI, directives, specially the reactive forms, makes it a better solution. IMO, to rejoice angular, one need to experience the problems in his/her past in larger teams, with no discipline. For me I don’t have time to explore around and figuring out what plugin suits best, what plugs is well maintained. I want focus on what to implement rather than how to implement. Thats why Angular suits my ideology. On the other hand, I puke over any react implementations by just looking at the garbage code. React is not the problem here for me. But the developers who tend to write horrific code in just one large JavaScript file that includes css, HTML, cryptic json objects, business logic, and so many other assets. Navigating in react code is just yuck. Again, IMO!
7
u/Cheshamone Dec 04 '20
Ha, I had the exact same issue pop up for me when I tried Svelte. I'm more of a Vue guy myself, but I agree with the conclusion, you're better off choosing something you're familiar with so you can focus on solving the problem you want to solve.
1
u/curveThroughPoints Dec 07 '20
Does anyone else find it ironic that the article quotes Tom Dale (he and Yehuda Katz made Ember.js) and uses what must be an out-of-context quote to rationalize their decision to stick with React?
Made me laugh a little bit.
1
u/secret_band Dec 07 '20
How is the quote out of context? Tom’s point is that vanilla JS apps accrete their own custom framework anyway, not that you should use Ember specifically.
1
u/curveThroughPoints Dec 07 '20
Hmm maybe out of context is not the correct phrase?
I think that taking only a part of what someone says on a topic, & using that partial/segment to rationalize something that the person would never themselves have rationalized with that same thinking, is taking their statement out of context.
Is there a better phrase here?
1
u/secret_band Dec 07 '20 edited Dec 07 '20
I don’t think it’s a phrasing issue, I just disagree with what you’re saying. The conclusion I came to is exactly what Tom rationalized, and I don’t think the rest of the article would change that conclusion. His article convinced me, and I took his advice. Where do you think he and I diverge?
32
Dec 04 '20
Not sure I'lll ever understand what kool aid React developers have drunk to make them so incredibly obsessed with one single framework.
It's just ok, chill out.
24
u/JavaOffScript Dec 04 '20
I don't think this article is about React specifically as much at it is about how a lot of time it makes sense to choose the battle tested, heavily used, "safe and boring" piece of technology instead of whatever new hotness you think might be slightly more performant.
7
Dec 04 '20
If everybody followed this advice nobody would be using React though. Someone's gotta take a chance at some point for things to move forward.
→ More replies (2)17
u/keb___ Dec 04 '20
The same kool-aid jQuery enthusiasts drank in the late 2000s/early 2010s. Remember back when we had
jQuery-datepicker,jQuery-dropdown,jQuery-${component_type_here}? Now we're in the same place, just replace jQuery with React. 😂5
Dec 04 '20
haha don't forgot a bootstrap, foundation and material versions + all their ports to other frameworks. My vote, bring on web components and end framework specific components for good!
7
u/nullvoxpopuli sand was never meant to think Dec 04 '20
React is the new jquery
2
u/codeByNumber Dec 05 '20
I’m still stuck in Angular land. I kind of like it though tbh. The opinionated framework works well for a large team of varyingly skilled developers.
I haven’t worked much with React yet but it is much less opinionated and allows you to plug-in your own tools for various things that are just baked in to Angular.
Is it due to this flexibility that React gets a bad rap? Kind of like jQuery and well JavaScript...it is so accessible and flexible that you can potentially write some really horrible code and get things running still.
9
u/mattaugamer Dec 05 '20
Nothing wrong with Angular. Richly featured Batteries Included frameworks are slept on by Reddit because people make poor choices. IMO.
Everyone is like “React is simpler than Angular!” and people nod sagely and agree. Then spend three weeks trying to figure out how to integrate React-Redux-Saga-Thunk-Query-Router with TypeScript on a custom Webpack setup.
2
1
u/Paccos Dec 05 '20
„Stuck“ is a hard word.
At least here in Germany, Angular seems to be still a bit more popular in terms of job listings than React (at least for now).
Maybe it’s because it is battle tested as you stated or because German companies are a bit „slower“ in adopting new technologies/frameworks, I don’t really know.
But Angular is still very very relevant.
1
Dec 05 '20
I really wanted to dislike angular (to be cool, as is required) but oh boy do I LOVE it now. It’s fantastic. Once you drink the kool aid, it opens up a lot of doors.
I think the bad rap with react is why someone like me now really likes angular: react is inconsistent. What I mean is that if you were to walk into 5 react shops, you’d have 5 different application architectures. You’d have multiple libraries for doing the same thing (depending on team preference). Vs angular... you know what to expect from project to project. Which speaks to your point about it being good at enterprise level.
1
u/_default_username Dec 05 '20
Why you say good thing like it bad thing?
1
u/keb___ Dec 05 '20 edited Dec 05 '20
I guess I would disagree that it's a good thing, but I see both sides of the argument. IMO, it's more advisable to use tools and libraries that are framework agnostic (preferably vanilla with 0 deps 😉) to reduce the chances of vendor lock-in and of creating a tremendous dependency graph that relies on your version of jQuery/React being version x.x.x, which then becomes a maintainability nightmare 7 years down the road when you want to upgrade React, but
react-thingie-majighas been deprecated for 5 years.Obviously, this problem isn't unique to the JS world, and I see the benefits in the short-term (rapid development).
2
u/anonssr Dec 05 '20
Also, it's a library. Not a framework. Framework is too big of a word for what react intents to solve. I bet "react devs" wouldn't like if people said they're "jquery devs".
7
u/HideousNomo Dec 04 '20
I've been a React dev for the last 5 years and I totally agree. Something better comes along and I will jump ship so damn fast. Who cares about what framework you are using? It's like everyone has React developer as their sole identity.
1
0
0
4
u/Mestyo Dec 04 '20
Not sure I'lll ever understand what kool aid React developers have drunk to make them so incredibly obsessed with one single framework.
For me, I feel like I can express what I want in React. The framework helps me, whereas other frameworks try to abstract away the important details. I suppose that appeals to beginners, but any time I try something that isn't a React-like I feel like my hands are tied.
1
1
5
Dec 04 '20
I've been running my personal stuff with preact + lit, in the form of buildless - mostly because it means I don't need a dev server to make stuff (or even an npm i), and lit's close enough to JSX I barely need to think about it (and I've got a good buildless -> react transform I wrote for when I feel the need to migrate to full react).
I wouldn't use this for production work, but as my own little toy, it's pretty neat.
5
u/Artif3x_ Dec 05 '20
I was fired for choosing React while working as a front end architect at a blue chip financial firm in 2018. Despite building a successful production application and component library off of React, Redux and Next.js, the rest of the company was full of C# zealots who made their love for Angular known by maneuvering to have me fired during a round of layoffs to make room for more cheap contractors.
I'm my absence, the other projects relying on my work foundered and a year later a recruiter offered me a "great opportunity" at a blue chip financial firm as a front end architect to convert a legacy application to React.
I told them they couldn't afford me. This was true, as I'd had two jumps in pay and rank since I was there, and I knew the pay ceiling on that position.
Moral of the story: React, or any great technology can get you fired if the leadership and your peers want it badly enough.
0
u/rArithmetics Dec 05 '20
sounds like you may have been on the outs anyway. sounds liek it did save you from having to go back tho. nice!
6
u/sipvellocet Dec 05 '20 edited Dec 05 '20
I choose Mithril.js for almost all projects that come my way, I adopted it years ago and never went back to the others and that is mainly because I personally found myself to be more productive with it then the counterparts.
I’ve had devs take over apps I’ve built with Mithril and for the most part I don’t think any dev has been happy about picking up a project that at first glance looks foreign to them, (ie: not React). I do make a conscious effort to keep things functional, well documented and above all else pure but far to often the React banshees will start wailing, it’s more so the HyperScript that really gets folk hot and bothered but regardless I have no plans to go back to React or Vue (though the recent Vue release was pretty dope).
I think other SPAs are great but that monopoly Facebook holds over tech makes me uncomfortable.
Here are my current stack choices and i still don’t know why they are not more widely known and leveraged:
Mithril instead of React.
Meiosis instead of Redux
FQL (FaunaDB) instead of GraphQL
Ava instead of Jest
pnpm instead of npm / yarn or lerna
Rambda instead of Ramda
Hope someone picks up or brings attention to the alternatives that exist. While React is the safe and preferred option, it’s not the only option. Diversify your stack.
Happy Holidays to all!
3
2
u/cinnapear Dec 05 '20
Same here for mithril.js. We do all our webapps in mithril.js, from a monolithic employee scheduling app to smaller dashboards.
6
u/elcapitanoooo Dec 04 '20
React is big, and its VERY easy to really screw up. If your not a seasoned dev your end product will probably (at least in my eyes) be a bigg ball of mid. React (the way, if you will) requires lots of experience outside react.
Reasons for this is the ecosystem, the state flow and usually poor management.
Its very easy to write poor apps in react (note, this is 100% not reacts fault) than it is in a more ”traditional” way.
Im all for simplicity, and really like react, but its really hard for beginners and mid level devs.
2
u/niet3sche77 Dec 04 '20
Funny, I used this exact same phrase at work about two weeks ago. I wanted us to “risk” really upping our game on the front-end. Developed some POC and documentation. Was basically told that would be too “hard.”
I then said, “well, React is a lot like IBM in 1988 or so. Safe choice. No one got fired for choosing IBM, just like no one will be exposed to any risk here by choosing React...”
1
2
u/scelerat Dec 04 '20
The author, perhaps unconsciously, references perhaps the most famous IT catchphrase of the 1980s: "Nobody ever got fired for buying IBM."
The phrase was used variably as a marketing bullet point (by IBM salespeople) or a derisive characterization of unimaginative IT middle management. IBM wasn't exciting, it didn't push boundaries, it didn't have the best development environment, but boy did it have job security!
Concomitant with the phrase was the notion of "fear, uncertainty and doubt (FUD)" in choosing a solution that did not involve IBM. Again, IBM sales and its proponents played up the FUD to achieve their numbers.
The backlash against IBM's gray ubiquity inspired Apple's first Macintosh advertisement, "1984," and accelerated the already established free software movement, leading to FreeBSD and Linux being popular alternative server OSes.
Good to keep these lessons of the past in mind, as React seems to dominate the front-end development landscape.
1
u/_default_username Dec 05 '20
It's an open source library though. No large corporate entity is profiting from me using it for my company's internal web app.
1
u/keb___ Dec 05 '20
While they don't profit directly, the fact that React's main contributors and arbiters are Facebook employees means that ultimately, the more widespread React is, the more leverage Facebook has on the front-end ecosystem.
Not saying there's any reason to be alarmed. But corporations know exactly what they're doing when they open-source their tools.
1
u/helloiamsomeone Dec 04 '20
Apple's first Macintosh advertisement, "1984,"
Seeing the situation with Big Sur this is pretty ironic and sad at the same time.
1
u/GoyasSaturn Dec 11 '20
“the situation with Big Sur“
Can you elaborate? Are you referencing this ‘issue’ : https://www.reddit.com/r/mac/comments/k0c00f/macos_big_sur_does_not_bypass_vpns/ ?
3
u/jsAlgo Dec 04 '20
Worked on angularJs for 2 years, recently switched to react and the best thing about it is.... react redux
9
3
u/thinkmatt Dec 04 '20
I also came from AngularJS (never got a chance to upgrade to Angular ;). If you're using Typescript, the best thing for me is typesafe templates! Writing karma tests to make sure you have the right variable name in your html template is painful, but it's the place that would break most often.
0
u/format71 Dec 04 '20
Angular/angularJs is the dementors of the web. It sucks all joy and happiness away, leaving the developer cold and soulless.
7
u/acemarke Dec 04 '20
Thank you, glad to hear that!
Just in case you haven't seen it, make sure you're using our official Redux Toolkit package, which is our recommended approach for writing Redux logic :
https://redux.js.org/tutorials/fundamentals/part-8-modern-redux
4
u/tomius Dec 04 '20
Really? Why do you like it? I'm not a fan of Redux at all. I avoid is as much as possible.
1
Dec 05 '20
Interesting! The most challenging thing about react for me is React Redux! It's a huge mess of boilerplate, and until React hooks came in, made me hate React.
I have minor experience with AngularJS (Pro-Vue here), what makes you like React Redux?
1
u/acemarke Dec 05 '20
What specific aspects of Redux are you concerned about?
Please note that "modern Redux" code is very different than what most older tutorials show. We've introduced newer APIs like Redux Toolkit, which is a set of utilities that provide a light abstraction to simplify the most common Redux tasks, and the React-Redux hooks API, which is generally easier to use than the traditional
connectAPI.I strongly recommend reading through the newly rewritten official tutorials in the Redux docs, which have been specifically designed to teach you how Redux works and show our recommended practices:
"Redux Essentials" tutorial: teaches "how to use Redux, the right way", by building a real-world app using Redux Toolkit
"Redux Fundamentals" tutorial: teaches "how Redux works, from the bottom up", by showing how to write Redux code by hand and why standard usage patterns exist, and how Redux Toolkit simplifies those patterns
The older patterns shown in almost all other tutorials on the internet are still valid, but not how we recommend writing Redux code today.
You should also read through the Redux "Style Guide" docs page, which explains our recommended patterns and best practices. Following those will result in better and more maintainable Redux apps.
2
u/gustix Dec 04 '20
This is why I chose Vue. You get the full view ecosystem out of the box. No need to cherry pick bundles, file loaders, state managers etc. You can pick well known cocktails in the React world and keep them with medium to low hassle - which I have done, but to just lean on Vue CLI is really hassle free.
1
Dec 04 '20
I agree with the sentiment, but can't but feel he tried and forced react patterns on other view libs.
1
u/_default_username Dec 05 '20
You could use react for the menu system where framerate isn't that important and use the vanilla JavaScript for the canvas for graphics.
Idk, when you say graphics editor I think of something like photoshop or gimp. You're going.to have a canvas in those situations and react really isn't the right tool for a canvas anyways. The whole menu system and control panels however would be great for react.
1
u/g5becks Dec 05 '20 edited Dec 05 '20
TBH, I want to use svelte for everything, but I'm too dependent on react-query, react-hook-form, react-virtual and the countless list of other react-* tools to switch right now, and on top of that - the react ecosystem embraces typescript 100% - svelte and vue are both playing catchup on this front.
1
-4
u/TrollocHunter Dec 04 '20
I don't doubt Reactjs is a good framework, but it's definitely not the best. I used to use Angular often now I am a Vue guy.
0
Dec 04 '20
[deleted]
-1
u/TrollocHunter Dec 04 '20
Bes for "me", everyone has a different opinion
2
u/troglo-dyke Dec 04 '20
It's not about personal opinion, there are strengths and weaknesses for each framework need on the project. Eg. The primary benefit of React is that you can easily hire developers who either know it or want to
→ More replies (1)
-5
u/d41d8cd98f00b204e980 Dec 04 '20
I've had some really weird performance issues with React with no obvious way to resolve them. Rewrote in vanilla JS, got 100x rendering speed improvement.
I love React, but it's got problems.
5
u/ShortFuse Dec 04 '20
Angular JS had CPU problems because of the digest cycle. They cleaned that up a bit with Angular 2+. React has a RAM cycle issue because of the VDOM and the immutable state tracking. Most React setups, off the bat, doesn't scale well for deep trees, or lots and lots of data.
In mostly any framework, the more complex your data gets, the more you have to fine tune it. At a certain point, you're better off with skipping the framework and working with vanilla JS. It's not for beginners though, but luckily React fills most architectural needs.
1
u/yeahdixon Dec 04 '20
You have to be real careful about rerenders. It’s pretty awful and easy to do.
-1
u/Oalei Dec 04 '20
We lost a ton of money at work because of React.
They changed their license a few years back which made us move to another framework. We lost hundreds of hours because of that.
Fast forward to today and they reverted some changes on the license which makes it ok to use it again at our company.
I don’t know what exactly in the license made us make the change though.
4
u/acemarke Dec 04 '20
Uh... how in the world did the switch from the "BSD+PATENTS" license to MIT make you lose work?
React was always open source. FB just switched it from the original "BSD+PATENTS" license to MIT because people were concerned that the "PATENTS" thing would allow Facebook to swipe your app's features and prevent lawsuits (very unlikely, but I can see why people interpreted the license that way).
So, I don't see how React itself caused you to lose money. Sounds like your company's lawyers got overly concerned about it and forbid using React. That's an internal issue, not React's fault.
2
u/Oalei Dec 04 '20
After some reading the start of my message was wrong: my company realized that there was the BSD license and not MIT (and that has a lot of implications, « unlikely » is not acceptable when looking at the law). This is why we dropped React.
Now it’s back to MIT and it’s fine.
I guess you could say it’s the fault of my company for not taking a closer look at the license at the beggining.1
u/acemarke Dec 04 '20
Yeah, I figured that must have been the case based on how you were describing it.
Sadly, licensing and legal departments complicate everything :(
1
u/PinkShoelaces Dec 05 '20
I think the GP is referring to when they added the Patents extension, not the switch to MIT.
3
u/acemarke Dec 05 '20
Yeah, looking back, I was partly mis-remembering things. I was under the impression that it was always using "BSD+PATENTS". Looks like it switched from MIT to BSD+PATENTS in Oct 2014. Granted, early-ish in React's history, but not from day 1 as I thought.
So, yeah, it's entirely possible that a company started using it when it was MIT, then didn't like the switch to BSD+PATENTS, and I was wrong in that I assumed it had always been that way. Sorry!
-2
u/doublej42 Dec 04 '20
Nope. I fired someone for choosing react. It was the wrong choice for backup software and now our backups don’t work but look pretty.
2
u/microleaks Dec 05 '20
Wouldn't react just be on the front end, I assume the back-end that does that actual back-up heavy lifting wouldn't have any knowledge of react? To me react would be as good a front-end as any, if it's just consuming a REST API, right?
2
u/doublej42 Dec 05 '20
In this case no but I was mostly joking. People stay on my team for generally 15 years and only leave when they retire.
0
Dec 04 '20
[deleted]
32
u/yeahdixon Dec 04 '20
I’m not enjoying having to use react at work coming from Vue.
48
u/daniels0xff Dec 04 '20
For me it was:
I tried to learn React and things didn't made sense to me. (to be honest I didn't give to too much time or patience of going trough a complete tutorial/course)
I found Vue and loved it and understood it easily
I went back to React and took a second look and loved it instantly this time and went full React.
13
u/mattaugamer Dec 05 '20
In my experience React makes the most sense to people extremely comfortable with JavaScript.
2
u/DOG-ZILLA Dec 05 '20
I’ve used both but I’m mainly a Vue guy.
What I hate about React is not really React’s fault but it’s the ecosystem. There appear to be 100 ways to do CSS with little consensus on a standard way. Choice is good and bad.
I tried styled components and that was okay but then moved to another React project that was using CSS modules. So not only do you have to get to grips with React but also learning how to do CSS in every new project. It’s frustrating.
This is also the same issue with state management.
In Vue, whether you want to use SCSS, PostCSS, Less etc etc it’s just a simple case of installing that library and adding a lang attribute to the style tag. Done! It’s such a nice dev experience.
→ More replies (3)4
0
Dec 05 '20
[deleted]
1
u/daniels0xff Dec 05 '20
What some people don't seem to realize in these discussions is that sometimes a framework just fits your mental model better than others.
Exactly! If we're talking features I'm sure all frameworks can eventually do the same thing and with all you can build the product that you need. But, some just fit your mental model (as you said) better, and you find it easier and nicer to work that way.
18
u/droptablesubreddits Dec 04 '20
Why not?
15
u/pninify Dec 04 '20
Lol people love to make aggressive boarderline insane blanket comments like “I don’t like react” or “python is a pain point in every project” or “don’t compile your C code” and never explain them
2
→ More replies (1)6
u/BreakingIntoMe Dec 04 '20
It’s usually because they don’t know what they’re doing and they don’t like the feeling of that, so they blame the tool.
5
u/relativityboy Dec 04 '20
I too want to know why not. I started VUE and React at the same time. React wasn't as pretty or fast (I've written my own framework, bonmot, based on Backbone; vue feels more like it than React). I left both for react because I found I was being incredibly productive in react vs either of the others. That was years ago.
I recently revisited it while considering a new position. The all in one file approach is fun, and cdn-to-run is new to (also very bleeding edge circa 2006) but with the smaller community, and the cli bombing out on vanilla install my thought was "how reliable/compliant can it be if they can't keep thier cli up to date, or at least post incompatibilities?"
At which point I decided a different position would be better.
1
u/start_select Dec 05 '20 edited Dec 05 '20
Do you really need a cli? The simplest react app is only three lines. Import React, grab a dom reference, call React.render()
That’s it. There is no complex scaffolding, it’s just a view renderer. How you choose to build an application around it is up to you.
I think the biggest problem is thinking you need a cli.
What you need is a packager. Learn webpack, then try nx and lerna and parcel. React shouldn’t package a cli, and CRA is not really useful beyond starting up an example project.
You NEED to understand how packaging works to be able to deal with production problems, which is true whether you are packaging react or angular or vanilla js.
Almost no open source frameworks/libraries have a cli to stub out your project structure. You shouldn’t be expecting one to hold your hand, or be dependent on one to try out a new npm package.
5
u/relativityboy Dec 05 '20
LOL. You'll get there padwan.
Our job as software developers is to save human effort. Why would I want to hand roll a dev stack for a new framework? Best practice is literally to follow best practices of the framework you're using. That's one of the most valuable rolls of a framework cli.
And let's not forget, you're kinda straw-manning here. The cli was broken. That's a real problem.
1
u/start_select Dec 05 '20 edited Dec 05 '20
Once again, there is no cli for react. There is a react-native-cli but that’s unrelated. And most issues with RN come from not understanding Xcode or android studio, and wanting to use RN without them, which leads to trouble. You are misunderstanding something.
Your job as a software developer is to accurately reproduce the designs or requirements that were asked of you.
For rich software that frequently means what is out there isn’t good enough.
Where did the framework/best-practices you are using come from? It didn’t just magically appear. Someone else used it to build real applications and started pulling bits out.
I never said I start from scratch every time, or that I don’t use libraries, just not necessarily anyone else’s framework. I’ve been doing it for over a decade. It’s no straw man argument that my teams deliver faster than our competitors, or the other teams at my company that don’t eat their own dog food.
There is a reason my billing rate is higher than other devs. I do eat my own dog food, so do the developers under me, and we deliver more software with less bugs in less time than the other teams trying to figure out how to fight bootstrap or material or expos choices for styling and composition.
It’s not rocket science. If you know how everything works and can alter the internals for a specific project, you can develop faster.
2
u/relativityboy Dec 05 '20
Once again, there is no cli for react.
"Once again?" You didn't state there was no cli for react in your previous comment.
And to bring it back on track again I'll quote myself regarding VUE.
The cli was broken. That's a real problem.
If one is going to release a cli to scaffold a project it needs to work, consistently and reliably. If there's an error it needs to report clearly and succinctly what the problem is. The VUE scaffolding cli failed to do either.
As for the rest, you seem like a nice human. I wish you luck.
EOL→ More replies (3)1
→ More replies (1)3
u/the_ju66ernaut Dec 04 '20
Damn yall are downvoting this guy because of his first-hand experience with something and his experience may be different than your opinion...
0
u/SustainedSuspense Dec 05 '20
We have a few high traffic Vue sites in production. Never felt like we were on the bleeding edge.
0
Dec 04 '20
[deleted]
3
1
u/terandle Dec 05 '20
This is the first I've heard of create-react-app bloat vs DIY webpack. What bloat does CRA add?
0
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).