Skip to content

Instantly share code, notes, and snippets.

@cacheflow
Created January 14, 2016 05:33
Show Gist options
  • Save cacheflow/69008a6d7e7c14015700 to your computer and use it in GitHub Desktop.
Save cacheflow/69008a6d7e7c14015700 to your computer and use it in GitHub Desktop.
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