Created
January 14, 2016 05:33
-
-
Save cacheflow/69008a6d7e7c14015700 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 from 'react'; | |
export default class List extends React.Component { | |
render() { | |
let names = this.props.names.map((person, index) => { | |
return ( | |
<div id="person" key={person + index}> | |
<div>Hello {person.firstName}</div> | |
<div>{person.lastName}</div> | |
</div> | |
) | |
}); | |
return ( | |
<div> | |
{names} | |
</div> | |
) | |
} | |
} | |
List.propTypes = { | |
names: React.PropTypes.array | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment