Skip to content
Back to skills

Rendering Conditional Render

ASecurity

Imported skill rendering_conditional_render from vercel

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 11, 2026
researchreact

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add bitwikiorg/skills.md --skill rendering_conditional_render --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rendering Conditional Render?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rendering Conditional Render
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bitwikiorg-rendering-conditional-render/badge)](https://www.skillsdirectory.com/skills/bitwikiorg-rendering-conditional-render)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Imported skill rendering_conditional_render from vercel
name: rendering_conditional_render
signature: 2ec2fa23c4148285144687050c52369adba3da2fbe3d486f8d3e0aad8f06f2bc
source: /a0/tmp/skills_research/vercel/skills/react-best-practices/rules/rendering-conditional-render.md
---

---
title: Use Explicit Conditional Rendering
impact: LOW
impactDescription: prevents rendering 0 or NaN
tags: rendering, conditional, jsx, falsy-values
---

## Use Explicit Conditional Rendering

Use explicit ternary operators (`? :`) instead of `&&` for conditional rendering when the condition can be `0`, `NaN`, or other falsy values that render.

**Incorrect (renders "0" when count is 0):**

```tsx
function Badge({ count }: { count: number }) {
  return (
    <div>
      {count && <span className="badge">{count}</span>}
    </div>
  )
}

// When count = 0, renders: <div>0</div>
// When count = 5, renders: <div><span class="badge">5</span></div>
```

**Correct (renders nothing when count is 0):**

```tsx
function Badge({ count }: { count: number }) {
  return (
    <div>
      {count > 0 ? <span className="badge">{count}</span> : null}
    </div>
  )
}

// When count = 0, renders: <div></div>
// When count = 5, renders: <div><span class="badge">5</span></div>
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.