diff --git a/content/docs/conditional-rendering.md b/content/docs/conditional-rendering.md index 5680ee21..2112eed1 100644 --- a/content/docs/conditional-rendering.md +++ b/content/docs/conditional-rendering.md @@ -93,12 +93,9 @@ class LoginControl extends React.Component { render() { const isLoggedIn = this.state.isLoggedIn; - let button = null; - if (isLoggedIn) { - button = ; - } else { - button = ; - } + let button = isLoggedIn + ? + : ; return (