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