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