liftedpixel / jammming

a Codecademy React project
http://jammmmmmmmmmmming.surge.sh
0 stars 0 forks source link

isRemoval #6

Open ghost opened 6 years ago

ghost commented 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?