Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.
Cloud computing is the biggest breach of privacy out there that we’ve adopted whole hearted.
PHP is not only for the web/short lived scripts
Care to elaborate on this? Not saying you’re wrong necessarily, that’s just a pretty bold claim and I’m curious why.
React works by maintaining a virtual representation of the DOM. When you dispatch state changes into the virtual DOM react can determine which components depend on the change and which side
useEffects run.My gripe is that YouTube tutorials teach that the useState is the equivalent of a variable. This encourages average developers to problem solve solutions that end up using React’s Virtual DOM for business logic. The YouTube tutorials have react devs planting 100s of useStates - some of which don’t directly induce a visible-on-screen rerender - and then ⅒ as many useEffects to bind these states together. This means that for the Virtual DOM to come to the conclusion as to what html elements need to be changed and how it has already mutated 20-50-100s of times and the CTO tells me the react app is slow and they’re mad.
If 2 states have the opportunity to mutate each other back and forth then the truth is that you have 2 perspectives of the same state. And React gives you solutions for that - proper solutions - the
useReducerhook is for defining these complex state mutations and the Context API for communicating that state to any component.And this has me quintuple pissed off because these same tutorial grade react devs install REDUX as compulsively as a pack-a-day smoker (that’s #3). They use Redux to file variables in JavaScript memory (that’s #4) like it’s a global variable and rarely if ever use it for the complex state mutations they need instead I’ve seen react devs write components pull state out of redux into a component just so it can mount useEffect and process the state and dispatch the result back into redux. Let’s not even bring up how the react-redux binding library literally uses the React Context API (that’s #5).
Since it’s apparent you can spot what tutorials do it wrong, would you be able to provide links or references to online tutorials that get it right?
One of the most valuable things you can do if you know a technology well enough to have these gripes is not just to condemn people fucking it up but shine a light on people that are trying to do it well.
As someone who’s worked with react for years, I’m convinced that react itself is the problem and there’s no way to educate new people on the proper way to use it without essentially teaching them everything the abstraction is intended to do for them. Why should newbs have to care about mutations and state dependencies when the api is apparently designed to help them forget about those things?
The React devs fucked up by not wrapping state in trackable containers, and we’re all paying the price with laggy apps.
Exactly this. Instead of learning about the complexity and footguns of working directly on the DOM, people get to learn about the complexity and footguns of manipulating the virtual DOM.
React isn’t bad, but it was designed in a very opinionated way to build certain kinds of apps. Excessive abuse of React hooks shows a common desire path to build things that don’t require that framework. Most people basically just want signal based reactivity but don’t know that it exists.
As a tutorial grade react developer (please return me to the backend where I am mediocre instead of bad), having more senior developers take the time to explain why my code was bad was really helpful.
Also I think I just kind of hate JavaScript. It always feels like everything is more complicated and booby trapped than it should be.
Getters and setters are ridiculous
Oh my god. I’m not the only one who thinks this!
YES
I don’t like working with them any more than you do, but they’re necessary to enforce read/write-level security. Without them, there’d be no differentiation between reading a variable and writing variable from an external class, which kinda defeats the point.
From a development standpoint, they’re an extra hurdle to clear. From a security standpoint, they’re a necessary evil.
Moreso correctness, not security. In the end, your user is shooting themselves in their foot, if they mutate a variable that they shouldn’t, and by making the variable private and only offering a getter, we document that.
Having said that, there’s also big differences between languages and paradigms, though.
In object-oriented / garbage-collected languages, you often pass around references to an object into so many places that you need to code defensively versus your own codebase. That’s why getters/setters were taught religiously during the height of OOP.In other paradigms, you often just have one place that uses an object and then you can …simply not shoot yourself in the foot there. When you control both the definition and the access, you don’t need to protect yourself from yourself. In particular, you would probably think twice before mutating an object anyways.
Damn, I was gonna disagree but you bring up some good points.
I really need to get into functional programming.
Functional programming is definitely worth a look in this regard as well, but what really drove this home for me is Rust.
Its ownership+borrowing concept is exactly that, it enforces that you’ve got one place where an object is managed and in particular mutating can only be done in at most one place.
Obviously, there’s also ways to get out of that, in case you do want some memory managed centrally, but it just isn’t the default.
That’s why people invented properties / auto generated getter/setter - in at least 95% of cases they are just busywork.
useStatehook is an actual plague on the entire React ecosystemPersonally, I find
useEffectto be the real evil.Personally, I find React to be the real evil.
I feel like useState and useEffect are 2 sides of the same coin
might you even say “two perspectives of the same object”?
I don’t think anything needs cloudflare in front of it. It’s a worthless service.
PHP sucks and every attempt at defending it is pathetic.
I get warm and fuzzy feelings that people here are not even talking about it. Perhaps I should follow that trend.
React is absolute trash and people should stop using it
Rust is a fusion of the worst parts from Javascript and c++.
If you are getting paid for engineering software, your labour should be licenced in an appropriate jurisdiction, and you should be liable to losing said licence if you do shit job.
No single letter variable names. Yes I also mean the
iinforloops you see in tutorials. Write out “index” or give it a more descriptive name. Doing the typing isn’t the hard part of programming, nor the most time consuming, so making it take a teeny tiny bit longer by having longer variable names is more than worth the value of variables the effortlessly describe themselves.line length is not that big of a problem anymore, we’re not on CRTs, people are regularly developing with 4k monitors, we don’t need to limit to 40 character lines but even still if you can’t possibly think of a way to break up that long of a line and the only thing you can think of to make it shorter is using over-acronymized variable names then you’ve already lost the plot somewhere
I do really disagree here. Name lengths should be proportional to the size of their scope.
If your function has 1 line, your local variables should almost all have 1 letter.
agree to disagree
I agree. Short, nonsensical, meaningless, artificial variable names make me think the person writing the code is a dinosaur from when they still had punch cards. Get with the times.
I’ll only agree for advanced for loops and not the basic C style ones. Also if you are iterating over coords like XYZ or UV you can use those variables as single letters too.
I disagree when it comes to standardized single-letter variable names. They’re invaluable when writing dense code for games or other math-heavy applications and you learn to recognize them very quickly.
So i for index in loops (and j, k for nested loops, but you’re almost always doing something wrong if you need them); x, y, z for position and h, w for size; r, g, b, a for color data, etc - you’ll immediately know what the variable is for at a glance even though it’s a single character.
Another benefit is that having related variables be the same character width keeps code visually aligned, which helps with readability.
I can concede that in games programming (which I’m not a game dev so I often forget about) x, y, and z coordinates are a valid exception.
I would disagree about w and h for width and height, typing them out feels like i for index
I worry about the phrase, “you’ll immediately know what the variable is for at a glance even though it’s a single character”
how often have you heard developers say that something is simple and it’s just because they wrote it? maybe it is obvious, but if it were more verbose it would be just as obvious but without any possibility of misunderstanding
and even if it’s obvious now there’s no guarantee a future developer doesn’t pull that variable out and mutate it or do something else with it, and maybe they should change it at that point but the effort to have it verbosely named from the start is miniscule
A lot of what people hate about Windows 11 is 10 years too early, especially when it comes to use of web components as interface
The Internet was always going to end up like this, attempts at “small, tight-knit, communities” will only last for a few years at most
Google has done more for web standards than the open source community ever could
The next mobile OS should abandon apps
Even if you did truely own your games, you would still be unhappy
You don’t like personalised advertising not because it feels invasive, but because you’re scared of being predictable and\or manipulable.
AI will actually kill the fuck out of us, even if it is just a stochlastic parrot.
The entire modern web tech stack should be thrown in a dumpster, ignited with gasoline, and blown up with a nuke for good measure.
React is a plague.
useStateand all the otherusehooks.







