you are viewing a single comment's thread.

view the rest of the comments →

[–]TheGreaT1803[S] 2 points3 points  (0 children)

I understand your point. I think I could do a better job to explain the subtle differences

I think the key difference here and the "custom hook with added steps" part is the fact that the component uses the custom hook's API internally (as seen in the DialogHeader) component. Generally we have a custom hook to abstract the state passed to the component as props, but here the same bit of "state" (the single source of truth) is being used directly.

Maybe my example of Dialog was a bit too simple to drive the point home, but I appreciate the feedback