Live data from Hacker News

Kind of annoyed at React

blog.cassidoo.co

11–20 of 135 posts

Re: Kind of annoyed at React

#11
> it’s not clear/an easily understandable mental model for most people

That's already the case, thanks to hooks. Hooks are weird, and should not be taught to junior programmers because it will confuse them for the rest of their careers. Hooks are weird because it doesn't align with functional programming paradigm or with OOP paradigm... it is a new paradigm and it is like nothing else.

More on that: https://medium.com/codex/can-we-all-just-admit-react-hooks-w...

Re: Kind of annoyed at React

#12
I sorta feel the same way. I used to be excited to spin up a react project, and loved working with it daily for 8+ years. It really was wonderful. Junior devs used to be able to write clear, performant, bug free code in react without a ton of hand holding. One of its greatest testaments. Now you need to spend 20 minutes figuring out what someone is trying to accomplish with a useEffect hook with 10 dependencies and if it’s running as expected or if that dependency should be wrapped in a useCallback. :) And that’s without even getting into the deep end of server components and bifurcating your frontend into static server and client components and hydrating the dom and using next router and blah blah blah. And we are told to use a framework by a VC backed company because create react app isn’t maintained anymore? Ok. Gonna go write some erb in rails or something.

Re: Kind of annoyed at React

#13
The React ecosystem has been trying very hard for a long time to enable developers to write code that is objectively bad, vis-a-vis colocation of concerns all in a single bigass, hard-to-understand function. Hooks were last straw for me, but the trend began before that.

React components should be simple stream transformers, nothing more. Accept props as input, produce deterministic HTML as output. All that other crap? Calling the API, massaging the data, business logic? That belongs somewhere else, outside of your component.

Re: Kind of annoyed at React

#14
Alongside the work on server components, they also deprecated Create React App, which was previously the official way to create new apps for development, and which had pretty good ergonomics. However, you won't find that documented on the actual CRA site - when you go looking for why your dependencies are out of date, you'll find references in obscure GitHub issues: https://github.com/reactjs/react.dev/pull/5487#issuecomment-...

As much as I like the React team and appreciate their willingness to try things (and hooks have grown on me a little), they are human, and I think some of the decisions and direction they've taken things is a mistake.

I was part of the team who deliberated on the decision to use React over Vue in WordPress, and one of the reasons for my personal preference towards React was that it embraced JS rather than inventing a whole bunch of new things - yes, there was the funky syntax of JSX, but aside from that all the statements were regular JS, and it was much easier to conceptually understand than learning a new language. Hooks started taking us away from that, with weird functions that magically encapsulate state, and things like suspense and server components have strayed further from the light.

Making things like Next the official pathway to getting started with React is great and all for people building Node SPAs, but there's a whole wide world of software outside of that bubble, and I hope the React team peers out a little more often.

Re: Kind of annoyed at React

#15

> it’s not clear/an easily understandable mental model for most people That's already the case, thanks to hooks. Hooks are weird, and should not be taught to junior programmers because it will confuse them for the rest of their careers. Hooks are weird because it doesn't align with functional programming paradigm or with OOP paradigm... it is a new paradigm and it is like nothing else. More on that: https://medium.co…

I totally disagree. React hooks are one the best things ever invented.

Re: Kind of annoyed at React

#16
React is overengineered. I guess it may have been worth it at some point in the past but the reality of browser tech has changed significantly and now there exist simpler ways to get superior results.

Re: Kind of annoyed at React

#17
Has anything really changed since around 2021? That's when I started using it. And I never looked back, except for very simple projects where I use vanilla HTML/CSS/JS.

Re: Kind of annoyed at React

#18

> it’s not clear/an easily understandable mental model for most people That's already the case, thanks to hooks. Hooks are weird, and should not be taught to junior programmers because it will confuse them for the rest of their careers. Hooks are weird because it doesn't align with functional programming paradigm or with OOP paradigm... it is a new paradigm and it is like nothing else. More on that: https://medium.co…

I'll never understand the "hooks are bad" people. I don't find useEffect confusing, creating custom hooks is a breeze, life is so much better than old class components.

When I read complaints about hooks I'm either missing something fundamental about why they're bad, or the people complaining are missing it.

Re: Kind of annoyed at React

#19
post #15

> it’s not clear/an easily understandable mental model for most people That's already the case, thanks to hooks. Hooks are weird, and should not be taught to junior programmers because it will confuse them for the rest of their careers. Hooks are weird because it doesn't align with functional programming paradigm or with OOP paradigm... it is a new paradigm and it is like nothing else. More on that: https://medium.co…

I totally disagree. React hooks are one the best things ever invented.

> one the best things ever invented

Fire? The wheel? Penicillin?

Maybe it's just because I'm getting older, but I'm increasingly annoyed when people use these sorts of over-the-top hyperboles.

Re: Kind of annoyed at React

#20
I've been enjoying the simplicity vanilla light-dom custom elements and minimalist express server for the API.

Lit-html for near zero-cost dom updates.

Been doing it for years, and struggle to understand why anyone would want to put up with the complexity of react.

Post reply on HN