Learn Before
Concept

Conditionally Rendering with Null in React

In some cases we won't want to render nothing, in that case we need to return null.

function Item({ name, isPacked }) { if (isPacked) { return null; } return <li className="item">{name}</li>; }

0

1

Updated 2023-03-20

Tags

JavaScript Programming Language

Object-Oriented Programming

Programming Language Paradigms

General programming languages

Computing Sciences

React Js