10 ms·
> I'm still a bit steamed from being gaslit all throughout the mid-2010s I get downvoted into oblivion every time I criticize React on HN (I mean, for one, Vue
by dvt 4y ago
> I'm still a bit steamed from being gaslit all throughout the mid-2010s
I get downvoted into oblivion every time I criticize React on HN (I mean, for one, Vue is like 10x better imo, but that's neither here nor there). Just too much money is poured into getting people trained on React and too many folks' livelihoods is directly tied to React for a serious critique of the monstrosity it turned into.
Facebook really did take over the world.
- antihero 4y agoOther than being owned by Facebook, I’m not sure how exactly React is a monstrosity. I think people downvote vue fans because it seems they can’t help but tirelessly bring it up any time there’s anything any React and a lot of people clearly don’t feel that vue is “better”, so it gets extremely irritating.
- funstuff007 4y agoAt this point, though, aren't React and Vue more similar than different?
- steve_adams_86 4y agoI set out to figure out the answer to this question by writing about it and comparing various performance issues, ease of composition of components, debugging, etc. I didn’t find any particularly interesting or meaningful differences. At the template level, JSX exposes more plain old JavaScript than Vue’s templates do. I find defining and using types in JSX land more intuitive. Otherwise they’re fundamentally both excellent and very capable and neither is doing any one thing glaringly wrong. I ended up scrapping it because the deeper I went, the less interesting it got. I think it really does come down to ergonomics and preferences
- mmcnl 4y agoVue supports JSX as well, and has been doing so for years.
- steve_adams_86 4y agoGood point, I didn’t bother taking this route but now that I’m thinking about it, maybe it would have been useful to illustrate differences between features state management.
- gervwyk 4y agoEven boring as it may sound, definitely something I would read, since I known React well but don’t feel like bothering to much with vue atm, but would like to understand the difference / nuances.
- acemarke 4y agoA few differences between React and Vue, purely off the top of my head. (Caveats: I am deeply involved in the React ecosystem and have never personally _used_ Vue myself, but am generally familiar with it overall.) Vue: rendering output defined primarily with templates and attributes like `v-for`; Single-File Components structure, lets you define styles as CSS and I _think_ they get scoped automatically; all major libs for routing, state management, etc, are considered "official" Vue packages and have at least some intentional coordination; probably less ecosystem churn overall due to those "official" packages; possibly easier to get started with, since it's easier to drop in one script tag and use it as a small enhancement to an existing page; reactive data UI for updating state (`state.value = 123` auto-triggers UI updates of components that rely on that data). React: JSX syntax for rendering logic ("It's just JS!"); no official structure for defining component files/folders/logic; React is still "just a rendering lib/framework", so all other capabilities (routing/state management) are filled in with community maintained packages (React Router, Redux, etc); _dozens_ of community packages for any conceivable use case, but plenty of churn as a result; _can_ be used with just a couple script tags, but in practice normally used with a full JS build toolchain; explicit `setState(newValue)` API for triggering re-renders, and renders many components by default - have to intentionally optimize components to avoid unnecessary re-renders.
- steve_adams_86 4y agoI might actually revisit it – maybe going a little deeper will eventually point to something interesting. Thanks for the nudge, I’m never sure who will be interested in things and why.
- jahnu 4y agoAnyone know of a good quality comparison out there? A video or blog post?
- progx 4y agoAs a svelte user, i shake my head on react and vue.
- jokethrowaway 4y agoRead the code, then go and check preact codebase which achieves the same api. React is the definition of an overcomplicated codebase + its model is wasteful and re-renders too much by default. It's the least ergonomic framework which became popular I've ever seen in my entire career. A pure case of resume driven project getting popular in some FANG and then being shoved down the throat of developers everywhere because cargo culting.
- nawgz 4y ago> Vue is like 10x better imo That's very much here and there, and ridiculous. Vue offers an interface that is extremely heavily transpiled and modified before it actually resembles code that can run on the browser, and uses an entirely magic (read: opaque) rendering system, making performance analysis quite difficult. React offers a thin layer on top of JavaScript - look up what JSX actually does if you feel the need to contest this - and offers clear semantics on how a component will evolve over its lifecycle. Plus the TypeScript integration is way better. So now back to your point: what are you criticizing about React? That you want the batteries included? That you think the vDOM is too heavy? If you're praising vue, I can't imagine you have a single legit criticism > too many folks' livelihoods is directly tied to React for a serious critique of the monstrosity it turned into If other libraries were actually as good, they would take over developer mindshare. They're too thick and with too much magic you can't control, React is on the exact opposite end of that spectrum with being thin and unopinionated outside of its core semantics. Which is the right end to be on, and the reason it is winning the developer mindshare war. Not because of sunk cost fallacy.
- dvt 4y agoI don't want to get in a whole Vue vs. React thing here, and I'm no megafan of Vue, either, but I just think it's a lot better designed than React. In fact, I mostly still use React because, hey, just about everyone knows it. > If other libraries were actually as good, they would take over developer mindshare This is incredibly naive. React's sole success relies on Facebook heavily pushing it in the conference circuit. "How React Saved my Life" was the go-to talk title in the 2010s.
- brimble 4y agoRedux is the only thing (sort of) from the React ecosystem that I'd save from a fire. But mine seems to be a minority opinion.
- oblak 4y agoRedux is largely responsible for turning me away from React sending me straight into Vue and Vuex.
- yourad_io 4y agoIf you ever have to go back to react, take a look at mobx It is very uncomplicated
- aabbcc1241 4y agoIMO mobx has better DX than redux, not sure why it's less popular. Probably because react community prefer FP over OOP?
- tcoff91 4y agoSome graphQL clients can eliminate the need for these state management tools. Everything becomes just graphQL queries and mutations with very sophisticated caching. When you mutate some resource, other components that have queries that are affected by the mutation will re render with the new state.
- acemarke 4y agoI'm sorry to hear that :( For what it's worth, we've changed Redux usage drastically in the last three years. "Modern Redux" with Redux Toolkit and React-Redux hooks is drastically simpler to learn and use than the older-style patterns, and we get feedback from users on a daily basis telling us how much they enjoy using RTK. If you're curious to see what that looks like, I did a video discussing the changes and cooperatively live-coding an example app: https://redux.js.org/tutorials/index#learn-modern-redux-livestream https://redux.js.org/tutorials/index#learn-modern-redux-live... and the "Redux Essentials" tutorial in our docs shows how we want people to learn and use Redux today: https://redux.js.org/tutorials/essentials/part-2-app-structure https://redux.js.org/tutorials/essentials/part-2-app-structu...
- vmception 4y agoIf you want to work for someone else, React is the thing you have to do and have prior, validated, experience in. The only employers not using React but other SPAs (Angular) are the “I want to be cool too” companies pretending to be in the tech sector. All major SPA’s have had convergent evolution towards the same optimizations implemented in the same ways with similar syntax as well. If one briefly had an advantage on package size, thats gone now. If one briefly had an advantage in a DOM manipulation technique, thats gone now. And thats that
- zozbot234 4y ago> All major SPA’s have had convergent evolution towards the same optimizations ... If one briefly had an advantage ... thats gone now. There's quite some room for disagreement wrt. this claim, depending on what exactly counts as "major" at any given time.
- vmception 4y agoOkay, what about when comparing React, Vue and Angular
- andai 4y agohttps://krausest.github.io/js-framework-benchmark/current.html https://krausest.github.io/js-framework-benchmark/current.ht...
- vmception 4y agothat makes me smile and I'll have to shift the goalpost toward what I actually think, which is the reality where the theoretical performance of optimizations is undermined by the 100 megabyte analytics package that your users are going to have to load anyway so while we all played around with page scores to optimize how fast things load to theoretically reduce strain on the server or have less users that bounce, its just so far divorced from the user experience because we'll wind up putting so much extra stuff on our pages anyway
- tambourine_man 4y agoTaking over the world is not the worst part, it's where it's steering it to.
- lsalvatore 4y ago> the monstrosity it turned into Literally what? React is responsible for infinitely scaling frontend features and career growth I never could have imagined.
- dvt 4y ago> infinitely scaling frontend features Front-end features can "infinitely scale" without React. Career growth is great, but, in my experience, after a while (maybe ~Senior Engineer), it becomes technology-agnostic.
- lsalvatore 4y agoWe wrote enterprise applications with jQuery and Backbone. It didn't scale. React fixed everything. There is no post-React. I'm not "technology-agnostic"- I only use React, and will only work for companies that use React. React is the best.
- rfrey 4y ago> There is no post-React Oh, you sweet summer child.
- robertlagrant 4y agoAlso, XML is the pinnacle of communication. How many conferences have I been to on it? I'm going to be using XMLSpy til I die! - you, if you'd been born 20 years earlier
- oneeyedpigeon 4y agoThis is quite a reactionary comment.
- simonw 4y agoMost websites built as SPAs using React are slower, buggier and more expensive to maintain than if they had been built using mostly server-side rendered pages, like we did in the 90s.
- travisgriggs 4y agoIt's interesting how history rhymes with itself. This pretty much sums up how I felt about Java in 2000. There had been a healthy evolution and interchange between different language ecosystems up until the late 90's. And then Java took over. One pundit opined "In 20 years, we will not talk about Java for any groundbreaking technical choices, but business schools will talk about how it was the first widely marketed programming language and the effect it had." I'm sure this will rhyme again.
- TimTheTinker 4y agoHe/she turned out to be somewhat right, though the JVM is still quite a marvel of engineering, not to mention Truffle. And today Java is a far more capable language than in 2000. I think the major difference between them and now for developers is that MIT/BSD/Apache-licensed, non-marketed languages and toolsets have gone mainstream. In other words, developers today no longer are paying through the nose for the tools they use, unless those tools are cloud-based.
- travisgriggs 4y ago> though the JVM is still quite a marvel of engineering I'm aware that some of those "marvels" were technologies harvested from Self/Smalltalk. But I suspect that there have been some innovations in the JVM that I just have not kept up with. When you say it's a "marvel of engineering", which types of things are you thinking of?
- TimTheTinker 4y agoI'm thinking specifically of the runtime performance optimizations. Hotspot is incredibly good at JIT generation of fast machine code.
- hyperman1 4y agoYou can add C++ to that list. It seems the pattern goes like this (with examples for C++, Java, Javascript) 1) There is an unmet need in the current technology ( e.g. C can't organize huge complexity, native app crashing is not tolerable on the web, web 2.0 is incompatible with full server side html generation). 2) A current techical powerhouse withbopen enough culture has a solution fixing it, while leaving current knowledge mostly intact ( C++ is C with classes, Java is safe C++, javascript is webified Java) 3) The powerhouse tech is used everywhere because it's voice is heard louder than the small playser, and also everyone wants to feel like a big player.( at&t, sun, google/facebook) 4) A cambrian explosion pops up full of components and frameworks. Most of them dies, nobody knows what tobbet on long term. The new good tech is both used and abused on every possible problem. 5) Things settle down, we learn what to use the tech for. 6) Circumstances change, we start fighting our tools, and the cycle starts again. The new group will not understand why the old guard is still loving their old klunkers (C illegal behaviour, Java XML), even if they have to construct a strawman first. In fact, both Cobol and C might be exampled of this, but they were before my time. There are plenty of smaller examples out there.
- hiyer 4y agoI'm mostly a backend engineer, but I've worked with react and Vue a bit and, back in the day, jquery. React is definitely way harder to grok than the other two - for someone who doesn't work on front-end full time. It feels like a different language of its own, while jquery and Vue seem to complement JS.
- oorza 4y agoTBH that's part of its appeal. JS is a mess, React is a relatively clean tiny little playpen inside a hoarder's house. If you're used to the stacks of newspapers and pizza boxes, it's a shock.
- deleted 4y ago[deleted]
- edem 4y agoit is not about the tech but the tooling. for example i cant use vue with nx because there is obly a 3rd party integration and it is broken.