React · Junior · Question 64 of 75

What do {false}, {null}, {undefined} and {0} render in JSX?

Explanation

Booleans, null and undefined are ignored. Numbers (including 0) and strings are rendered, which is why {items.length && <List />} can show a stray 0.

Further reading

Problem with a question

React · Junior · question 64

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz