Comment

Comment by spicebox

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.
parent spicebox 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton