import React, { Component, PropTypes } from "react"; import { AlbumRow } from "./Album"; export default class Artist extends Component { render () { var albumsRows = []; if (Array.isArray(this.props.artist.albums)) { this.props.artist.albums.forEach(function (item) { albumsRows.push(); }); } return (

{this.props.artist.name}


{this.props.artist.summary}

{this.props.artist.name}/

{ albumsRows }
); } } Artist.propTypes = { artist: PropTypes.object.isRequired };