Course lesson
Conditionally render JSX in React with ternary and logical operators
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!
- Duration
- 1 min
- Access
- Free
- Transcript
- Available
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!