Created
December 13, 2017 04:59
-
-
Save jeanpaulsio/5b1c8ccfc96b5787fd6bfbd3f758d7a8 to your computer and use it in GitHub Desktop.
Conditional Rendering in React
This file contains hidden or 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
render () { | |
return ( | |
<div> | |
{this.props.errors && <div>Error Message</div>} | |
<h1>Your Amazing Content</h1> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment