I love how React hooks let me create a well-named, encapsulated, reusable logic


I love how React hooks let me create a well-named, encapsulated, reusable logic.

My components are simple and easy to understand because the complicated stuff is in well-named, focused, reusable hooks.

Of course, this idea is nothing new - functions do this too. So if the logic isn't React-specific, I just declare a plain 'ol pure function.

React hooks are special because they allow me to encapsulate and reuse *React-centric* logic.

View original on X