Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

React still rocks, as it keeps "magic" to the minimal (Hook introduces a little magic for a tradeoff).

Simplicity is key here.



Hooks are not simple at all, are very error prone, and definitely do not put the user in the "pit of success". JSX is terrific, but React has only gone backwards since classes IMO.


The main gotcha with hooks is declaring dependencies for re-renders. It does not take very long long to learn, and it certainly is simple to fix once the problem is realized.

One of the nicest things about hooks + functional components is how much easier it is to refactor. With class based components, nested state and lifecycle behavior made it sometimes difficult to break down complex components.

But I feel like with functional components and hooks, refactoring into logical subcomponents is a breeze.


I believe that React's hooks implementation is sub-par, not that "a" hooks implementation wouldn't work. Their current implementation badly needs a real compiler (the whole dependencies array stuff is atrocious, as well as some of the useMemo/useCallback performance issues), or a totally different approach that is actually reactive (e.g. SolidJS). IMO the burden of their implementation on the developer is too large.


Highly highly disagree. Hooks and Functional components are so much easier to work with nowdays then class based components that came before.


Agreed. Ever since I started writing functional components only I’ve found less bugs make their way into my code.


Not a react fan, here, but hooks are so much better than pre-hooks react. Not sure why anyone would want to go back.


If you were choosing a framework today, what would you use?


I wouldn't work in the browser at all. I'm liking SwiftUI a lot.


Is it really cross platform?


Not sure what you mean by "really". I guess I have heard some use of that term to mean that it works on watchOS/macOS/iOS/iPadOS/tvOS. In priciple one could create implementations on other platforms, but no one has (beyond toy examples).


Hooks are not simple. I have yet to find a dev who doesn't make subtle mistakes with them on a regular basis.

I think the concept of hooks is fine, but JS/TS is an insane language and requires an enormous amount of discipline to write.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: