Created
January 19, 2016 06:45
-
-
Save codeaholicguy/ffab9b12abf1f4554007 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ternary operator | |
<div> | |
{ enabled ? <p>Enabled</p> : null } | |
</div> | |
// if/else outside of JSX | |
let node = null; | |
if (enabled) { | |
node = <p>Enabled</p>; | |
} | |
<div>{ node }</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment