top | item 45279619

(no title)

spicebox | 5 months ago

The whole reason that hooks were created was that they could composed, as opposed to stuff like renderprops or mixins. When you create a custom hook that uses a useState and a useEffect, that's composition. They have the caveat that they can only be composed into new hooks, but that's just like async functions only being able to be called from other async functions.

discuss

order

No comments yet.