Conditionally render JSX in React with ternary and logical operators

Share this video with your friends

Send Tweet

In this lesson, we decide what markup should be rendered with ternary and logical operators inside our JSX. We want to control the shortlist title, and if there are no names in the ShortList, we don't want to render an empty <ul> tag in the DOM!