5 ms·
React is the pragmatic answer. Most devs are of average talent and will hang themselves and everyone else with the stateful webs they weave. Even with careful
by hajile 3y ago
React is the pragmatic answer.
Most devs are of average talent and will hang themselves and everyone else with the stateful webs they weave. Even with careful PR reviews, these things have a way of sneaking in and becoming permanent hinderances.
Performance hasn't been a dealbreaker in most JS apps for years now. What HAS been a problem is getting good code out the door as fast as business needs. MOST React code is disposable based on the whims of the company. The bits that aren't disposable are used enough to justify having them designed and maintained by your best devs who should also have the skill to write performant code.
- josephg 3y ago> What HAS been a problem is getting good code out the door as fast as business needs. MOST React code is disposable based on the whims of the company. I know you're right; but this still deeply saddens me. I want well crafted software. I want the code I write and the code I depend on to be made in a way that holds reverence and honor for the craft of software engineering. I don't want to be running crappy, badly performing javascript made by average talent in react, that exists to serve someone else's transient business needs. Gross.
- rmilejczz 3y agoI don’t know about you, but I have bills that need paid. I’ll clutch my pearls over something else
- josephg 3y agoI have a friend who's a car guy. He bought some fancy Mazda that he just adores and he takes to the track sometimes. He's not pearl clutching. He's in love with that car. He keeps it immaculate and he has a sparkle in his eye when he talks about it. Some people are the same with furniture. They buy super expensive, custom stuff and look after it for decades. Not me! All through my 20s I didn't care at all and my various homes were full of cheap ikea furniture. I had bills that need to be paid, and why should I pay more? Most of it is probably in landfill by now. I'm not an expensive furniture guy. And I'm not an expensive car guy - I don't even own a car. But I am into software. Software is kind of my thing. When software works fast and well, when its clean, reliable, tested and memory efficient - its the best. I know deep down everything is right in the world. And, obviously, I hate disposable, cheaply made software. I hate when software runs slowly. I hate seeing my expensive computer working hard to do basically nothing because of lazy code. And I hate running into stupid, avoidable bugs. I don't want to create work like that. And I don't want to use with software like that. When software is laggy and unreliable, my skin crawls and I feel disgusting. Intellectually, I recognize that there's a place for the cheap ikea furniture equivalent in software. But craftsmanship matters to me. And I personally, hate bad software and I don't want it on my computer. Does that make me a pearl clutching, elitist snob? Sure, whatever. But I'm done acting like I'm sorry for what I like.
- rmilejczz 3y agoMy comment was meant to be a more humorous jab at my own efforts as a software engineer but in re reading I think it came across as rude and I apologize. I think if you feel strongly about something you should defend it!
- avarun 3y agoWas not funny at all FYI. Trotting out overused clichés about how little pride you have in your work is never funny.
- mattgreenrocks 3y agoGotta love how people trot out this crap on Hacker News, a place they ostensibly self-selected into.
- no_wizard 3y agoit may have been true in the Knockout days, however signals in Solid is very very similar in feel and reasoning to React hooks. It makes it straightforward to reason about, because you aren't dealing with globals, undeclared deps etc. like in the Knockout days
- mwcampbell 3y agoCounterpoint: https://ericwbailey.website/published/modern-health-frameworks-performance-and-harm/ https://ericwbailey.website/published/modern-health-framewor... Performance does matter to the people who depend on our products. Can we please stop throwing people under the bus in the name of churning out more crap?
- hajile 3y agoThe real-world performance difference between Svelte and React outside of the tiny benchmark apps isn't very much. The fact that React can prioritize rendering of some things over others means that it can be slower overall, but still feel faster to users.
- RussianCow 3y ago> The real-world performance difference between Svelte and React outside of the tiny benchmark apps isn't very much. I don't know, IME it's pretty easy to run into bottlenecks with React. To resolve these, you have to spend time optimizing data flow and preventing unnecessary re-renders, and it can be really difficult to trace where an update originally comes from. Svelte and other reactive frameworks give you good performance by default, so it's very unlikely you ever have to do this in the first place.
- james2doyle 3y agoI agree with you on this. I never had to deal with `useMemo` and `useCallback` equivalents in Vue apps. The framework is implemented in such a way that it can let me focus on the task at hand. If I have errors in Vue apps, they are logic errors not "you didn't cater to the framework's rendering model" errors
- hajile 3y agoWhat is the actual difference between React and Svelte? People don't actually know, but this isn't like the old days where React offered 10x (or more) performance increase over AngularJS without even trying to optimize. We're arguing "better" using very slim margins. Looking at the geomean benchmark suite everyone uses, it's 1.33 for Svelte 4 and 1.67 for React. That's a mere 0.2x difference and most of that is due to row swapping performance from React iterating lists of thousands of elements -- hardly typical in most apps. Your team will make THOUSANDS of decisions in your app that will make WAY more difference than 20%. Incorrectly nest some loops in your data processors and the performance difference will almost instantly outshine the update differences. And all of this is without mentioning that the React team is working on a compiler that will offer many of the benefits you get from the custom Svelte compiler (though TBH, I dislike needing a special compiler for custom JS). EDIT: I'd also add that the Stage 2 record/tuple proposal will make comparing props many times cheaper and should give a massive performance boost to React as this comparison is one of the things that slows it down.
- Tade0 3y agoI've seen people hang themselves with (or should I say on?) hooks. Performance was the main issue because one incorrect usage of a hook can make a huge difference.
- troupo 3y agoAverage devs struggle with useEffect, useCallback, useMemo and other hooks. If anything, Svelte, Solid and Vue are significantly easier.