What is this kind of expression called and how or when should it be used?
{props.type === "big" && <h2>{props.title}</h2>}
The {} part is a JSX expression that allows you to embed JavaScript code in JSX markup.
The && is a logical AND operator, but in JavaScript, instead of resulting in either true or false, && does this:
&& operation takes that result as its result and stops here&& operation evaluates the right-hand operand and takes that value as its resultSo props.type === "big" && <h2>{props.title}</h2> means:
props.type is "big", put <h2>{props.title}</h2> here.false, null, or undefined)how or when should it be used
It's typically used when you need to render something conditionally. The condition is the first part (props.type === "big"). The thing being rendered, or not being rendered, is the second part (<h2>{props.title}</h2>).