Skip to content
public-library›Rules›React›Create explicit component variants instead of boolean mode props

Create explicit component variants instead of boolean mode props

When boolean props select different modes of a component, create a separate component for each mode that composes shared parts.

In the full rule