Open ghost opened 6 years ago
https://github.com/liftedpixel/jammming/blob/master/src/components/Playlist/Playlist.js#L24
The isRemoval prop is a handy solution, but it's a little "extra".
Could your TrackList component just check for the presence of either this.props.onRemove or this.props.onAdd to decide how to render, instead?
TrackList
this.props.onRemove
this.props.onAdd
https://github.com/liftedpixel/jammming/blob/master/src/components/Playlist/Playlist.js#L24
The isRemoval prop is a handy solution, but it's a little "extra".
Could your
TrackList
component just check for the presence of eitherthis.props.onRemove
orthis.props.onAdd
to decide how to render, instead?