Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Last active July 18, 2016 16:44
Embed
What would you like to do?
import React, {Component, PropTypes} from 'react';
export default class TrackList extends Component {
static propTypes = {
tracks: PropTypes.array
}
static defaultProps = {
tracks: []
}
render() {
return (
<div>
{
this.props.tracks.map((track) => {
return <div>Track: {track.title}</div>;
})
}
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment