Created
July 28, 2018 15:44
-
-
Save dance2die/bdf5546e36fa6b707399152a6476b389 to your computer and use it in GitHub Desktop.
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() { | |
| const items = [1, 2, 3, 4, 5].map((id, i) => { | |
| return ( | |
| <div key={id} onClick={() => this.handleClick(i)}> | |
| <Child id={id} isClicked={this.state.clicked[i]} /> | |
| </div> | |
| ); | |
| }); | |
| return ( | |
| <div> | |
| <div>{items}</div> | |
| </div> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment