top | item 20016772

(no title)

anty | 6 years ago

Okay, I guess you could attach that functionality to an existing component. It just feels wrong to me, that you would put something that looks like a separate component into a hook to inject into another component. I thought there was some benefit in doing it like this, that I cannot think of...

discuss

order

k__|6 years ago

The main goal of React hooks was the shrinking of the component tree. Most people would probably create their own version of an SVG component and then they would have to nest the library component. Now they just have to throw in the hook and be done with it.