5 ms·
I'm glad I'm not the only one who sees this. Are the people building React completely oblivious to the nigh-unbearable code smell that this is? Why is it so di
by dolni 5y ago
I'm glad I'm not the only one who sees this.
Are the people building React completely oblivious to the nigh-unbearable code smell that this is? Why is it so difficult to reason about whether or not code will have side effects?
I'm no frontend developer, and certainly don't have experience with React, but after stopping in at their homepage to see what it does for me and finding out about "JSX syntax"... jesus. I don't know how you parse something like JSX, but I would be willing to bet the implementation is a dumpster fire of completely unnecessary complexity.
I would really like to believe that the people building this stuff aren't amateurs, but the more I learn, the more convinced I am that this is the case. The modern web is bloated, slow, and riddled an assortment of issues that is different depending on which site you're on. Will my back button work this time? It's anybody's guess!
It only seems appropriate to lay the blame at the feet of those who thought the best course of action was to make web development ten times more complicated than it needs to be.
- joshribakoff 5y ago> Are the people building React completely oblivious Perhaps the people criticizing it so flagrantly are oblivious to the goals motivating their design choices. No one is forcing you to use it.
- sibit 5y ago> No one is forcing you to use it. Kinda depends on where you work / what you do.
- joshribakoff 5y agoBlame the employer (or yourself for not switching) if it’s really that unbearable, it’s not the React team’s fault
- sibit 5y ago> it’s not the React team’s fault I wasn't intending to imply that it was the React team's fault. Personally, I like React and think it has its uses. I was loosely referencing an old coworker who was successfully and comfortably using jQuery for over a decade. > Blame the employer I do. They wanted cheaper labour so they had a revolving door of junior developers straight out of online React boot camps and since it's all they know it's what they used on every project regardless of other technologies that were a better fit. Turnover can be expensive so the company caved in and turned every project into a React project. > or yourself for not switching Sometimes easier said than done. It can be hard for some people to up and leave when they like their boss/company that they've worked with for 20+ years.
- tshaddox 5y ago> Why is it so difficult to reason about whether or not code will have side effects? I’m not sure exactly what you mean here, but I can’t think of any reasonable way to write a JavaScript framework that invokes developers’ JS code containing functions, closures, etc. and makes it simple to reason about whether that code will have side effects. This seems like a basic consequence of Rice’s theorem. I suppose you could have a compiler that only supports a strict subset of JavaScript and makes side effects easier to reason about, but arguably that would just be its own separate language altogether.