The React Hook Proposal

twitter logo github logo ・1 min read

What do you think about React's new hook proposal?

You can read about it here

The RFC is also online.

I like how it composes much nicer than classes and seems like a clean solution to the main problems React faces.

But does it replace the current API with something more complicated?

twitter logo DISCUSS (4)
markdown guide

does it replace the current API with something more complicated?

AFAIK, Facebook (FB) doesn't have a plan to phase out class based components.

I believe FB is pushing people toward writing more composable components & behaviors (hooks), creating meaning smaller components (just like Functional Programming promotes writing small functions and compose them together).

React might become more "complicated" but the architecture your site would be more manageable & readable.


Haven't tried it out yet, but was listening to a brief overview from Kent C. Dodds and one example that comes to mind is componentDidMount (sync) vs useEffect (async), so there appears to be performance benefits to using hooks.

I'd also guess that since everything is a function now, it would be easy to mock hooks via jest, if necessary.

Gonna get back to day 1's live stream now πŸ˜‰


As with most their recent changes, I feel like they are veering too far towards solving complex problems that happen at Facebook scale, at the cost of making it more complex for the 99% of other use cases.


"Redux" has the same issue. People tend to use it early in the project creating a complicated (not complex) source code structure.

"Hooks" should be introduced gradually only when needed (but doubtful people would follow πŸ˜›)

Classic DEV Post from Jun 25 '19

What does your Junior interview process involve?

Explain what your junior interview process involves and what you look for in junior candidates.

K profile image
Taking care of developer relations at Moesif and creating educational content at \newline