Created
April 24, 2018 20:32
-
-
Save nerdic-coder/a064ea76d815d946c270510201f65c74 to your computer and use it in GitHub Desktop.
selected hero condition
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
{this.selectedHero ? ( | |
<div> | |
<h2>{ this.selectedHero.name.toUpperCase() } Details</h2> | |
<div><span>id: </span>{this.selectedHero.id}</div> | |
<div> | |
<label>name: | |
<input type="text" value={this.selectedHero.name} onInput={(event) => this.handleChangeName(event)} placeholder="name" /> | |
</label> | |
</div> | |
</div> | |
) : ( | |
<p>Select a hero!</p> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment