Created
March 4, 2019 12:31
-
-
Save Violet-Bora-Lee/3d93f98ce533a5ff1bfe6685b130d3a6 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
import React, { Component } from 'react'; | |
class App extends Component { | |
// class content | |
render(){ | |
const users = [ | |
{ name: 'Nathan', age: 25 }, | |
{ name: 'Jack', age: 30 }, | |
{ name: 'Joe', age: 28 }, | |
]; | |
return ( | |
<ul> | |
{users | |
.map(user => <li>{user.name}</li>) | |
} | |
</ul> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment