Settings

Theme

Ask HN: Anyone else think the new React Hooks API offers little to no value?

1 points by MarvelousWololo 7 years ago · 4 comments · 1 min read


I mean it adds a lot of overhead and specific domain knowledge without any real gain. There's nothing we can do with hooks that we cannot do with plain JS classes. To make sure it will not impact a component performance - being called everytime to render even though there's no need for that - we have to use a special hook - useCallback.

Klonoar 7 years ago

I have a very love/hate relationship with them. I love them on the surface, I detest that one of the main selling points for them in the beginning has been avoiding the "this" issue.

We've been dealing with that issue for something like 20 years now, and not knowing it will bite you in far more places than React.

andrewstuart 7 years ago

>> I mean it adds a lot of overhead and specific domain knowledge

It would be easier to reply if you were specific about what you mean.

Update:

what do you mean exactly "it adds a lot of overhead"

what "specific domain knowledge" precisely do you mean?

  • MarvelousWololoOP 7 years ago

    I'm sorry. What I mean about what specifically? The part about specific knowledge? React had a tiny API surface now we will have several hooks out of the box.

MarvelousWololoOP 7 years ago

My coworkers are dying to rewrite large portions of the company's app just because... it is new? I don't understand it all.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection