Skip to content
public-library›Rules›React›Build complex components from composable parts

Build complex components from composable parts

When callers need different arrangements of a component's parts, expose compound components they compose as children, sharing state through context. Keep a complete component for a repeated standard arrangement so ordinary callers do not have to assemble it. Use render props only when the component must pass data back to the caller's content.

In the full rule