Created
January 10, 2018 23:33
-
-
Save tryggvigy/17f9d8f01c458fd25e09497f774a8dbe to your computer and use it in GitHub Desktop.
Krass
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
const users = [<User name="Fannar"/>, <User name="Tryggvi"/>] | |
before | |
<div> | |
{users.map((user, index) => <User key={index} name={user.name} />)} | |
</div> | |
after | |
<div> | |
{[<User key={user.id} name="Fannar"/>, <User key={} name="Tryggvi"/>]} | |
</div> | |
<User name="Fannar"/> | |
React.createComponent(User, { name : "fannar"}) === <User name="Fannar" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment