Concepts
Conditional rendering
Choose the returned UI from current input using JavaScript branches.
Formal Syntax & Structure
react syntaxreact
if (condition) return first; return second;Working Example
Example Snippetreact
function Pickup({ ready }) { if (ready) return <p>Ready</p>; return <p>Wait</p>; }