Skip to content

Glossary: React Basics

Conditional rendering

Also written: conditionally render

Showing different JSX depending on a condition, such as "Sold out" for stock 0. React has no special syntax for it: you use `if`, the ternary `? :` or `&&`.

Where the book teaches it

Related terms

Early returnTernary operatorShort-circuit && in JSX