diff --git a/src/content/learn/conditional-rendering.md b/src/content/learn/conditional-rendering.md index 95be5d2e018..11cd674e6be 100644 --- a/src/content/learn/conditional-rendering.md +++ b/src/content/learn/conditional-rendering.md @@ -444,8 +444,10 @@ If you're not familiar with JavaScript, this variety of styles might seem overwh * In React, you control branching logic with JavaScript. * You can return a JSX expression conditionally with an `if` statement. * You can conditionally save some JSX to a variable and then include it inside other JSX by using the curly braces. -* In JSX, `{cond ? : }` means *"if `cond`, render ``, otherwise ``"*. -* In JSX, `{cond && }` means *"if `cond`, render ``, otherwise nothing"*. +* In JSX, `{cond ? : }` means: +
*"if `cond`, render `
`, otherwise ``"*. +* In JSX, `{cond && }` means: +
*"if `cond`, render `
`, otherwise `cond` or nothing if `cond` is either `null`, `undefined` or an empty string"*. * The shortcuts are common, but you don't have to use them if you prefer plain `if`.