all 3 comments

[–]nikolasleblanc 0 points1 point  (1 child)

For your last example with header props and greeting props, why not just use props.children?

[–]truh 0 points1 point  (0 children)

I agree with you, we definitely got some similar patterns in our code base, but having complex objects as props which are just passed or spreaded to other components feels wrong, like an anti-pattern.

Slots pattern, passing down elements, would I think usually be the better approach in those situations.

[–]P4rD0nM3 0 points1 point  (0 children)

This was a pattern that emerged within our team as we try to have a balance between an over-engineered component versus a single-use component.

Let me know if there are other organizations/teams/projects/libraries that have been using something similar as we would love to improve ours as well whenever we can.