Apr 25, 2021
Hi Jack,
very interesting article :)
The pattern you described is actually very similar to the "render prop" pattern (https://reactjs.org/docs/render-props.html).
I think it is good to know both of them and use them where they fit better. Compound components seem to be more readable when there are more "render props". If there is just one or two things to render, I prefer to just pass them as props.
Kind regards
Krzysztof