Hacker News new | ask | show | jobs
by grayrest 1552 days ago
I have not adopted hooks and have argued against it for others on the team. My primary objection is that the paradigm is not clean.

Class based components are fairly straightforward. The entire render function is run on every change.

Solid/Svelte are fairly straightforward. The component is run once and then only the reactive parts change.

Hooks run the function on every change but there are islands of non-running code inside the constantly rendering body where only run when their dependencies change. This strikes me as an obviously intermediate solution and I don't want to spend time porting/developing something that's going to be obsoleted in a year or two.

The next framework generation is underway and the time for early adopters to move on is in the next year or so. The main reason to hold off is that the handling of SSR/hydration/etc is in flux and I believe the primary benefit of the upcoming generation is going to be ability to avoid shipping most component code over the wire.

I have a lot of respect/love for React. I've seen quite a bit of criticism that the vdom idea is inherently inefficient but the important thing about it was that it was reliable. Lots of JS used to do all sorts of crazy stuff with the dom underneath you but React has basically cleared the field of most of that which allows more fine grained approaches to work consistently.