Created
July 1, 2018 10:41
-
-
Save sagar-gavhane/8a6d8783da19ff9748f15fa5778eac1c to your computer and use it in GitHub Desktop.
JSX Control State IFEE
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
class JsxControls extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
counter: 100 | |
} | |
} | |
render() { | |
return ( | |
<div className="App"> | |
{ | |
(() => { | |
if (this.state.counter === 100) { | |
return <p>Blah</p>; | |
} else { | |
return <p>Herp</p>; | |
} | |
})() | |
} | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment