Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackList #2

Open
mp1pro opened this issue Nov 11, 2017 · 0 comments
Open

TrackList #2

mp1pro opened this issue Nov 11, 2017 · 0 comments

Comments

@mp1pro
Copy link

mp1pro commented Nov 11, 2017

in the TrackList class there is no need to render the list of tracks based on this.props.isRemoval because whether it is true or false we still would like to render a list of tracks. We already used this.props.isRemoval to load each track with a add or minus option in track.js. Hence Tracklist class would be like so:

class TrackList extends React.Component {
  render() {
    return (
      <div className="TrackList">
        {
          this.props.tracks.map(track => {
            return <Track track={track}
                          key={track.id}
                          onAdd={this.props.onAdd}
                          isRemoval={this.props.isRemoval}
                          onRemove={this.props.onRemove} />
          })
        }
      </div>
    );
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant