Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Experiment how React hooks can improve our codebase #11161
React 16.7 introduces this concept of hooks. In this PR, I'm creating some hooks to explore this API and how it can improve or not our codebase and APIs.
So far, I'm thinking that it's a great API, I like how you can reason about discrete behaviors and combine them later in components without having to wrap your components or create extra DOM nodes you don't really need.
This is surprising (even if you subtract 2 lines added for React version upgrade).
It definitely promotes code reuse and composition similar to what HOCs offer with much easier syntax. By easier, I mean no need to create all those wrapping components which do nothing and introduce lots of confusion. I'm looking forward to the day when 16.7 stable is out