Skip to content
public-library›Rules›React›Use a boolean condition for conditional rendering

Use a boolean condition for conditional rendering

When the left side of && in JSX is not a boolean, turn it into one, such as count > 0, or use a ternary that returns null.

In the full rule