Closed stephencastaneda closed 4 years ago
As a user, when the song list loads, I should be able to delete a song.
WHEN looking at the songs list THEN I click on the delete button AND the song should delete
in Songs.js
Songs.js
removeSong function passes in songId
removeSong
songId
then it calls songsData.deleteSong and passes in songId
songsData.deleteSong
.then calls getSongs
.then
getSongs
.catch console longs unable to delete items
.catch
in the render()
render()
pass removeItem into songList component
removeItem
songList
in SongList component
SongList
onClick
this.props
User Story
As a user, when the song list loads, I should be able to delete a song.
AC
WHEN looking at the songs list THEN I click on the delete button AND the song should delete
Dev Notes
in
Songs.js
removeSong
function passes insongId
then it calls
songsData.deleteSong
and passes insongId
.then
callsgetSongs
.catch
console longs unable to delete itemsin the
render()
pass
removeItem
intosongList
componentin
SongList
componentonClick
calls the functionremoveSong
removeSong
should be coming in fromthis.props