componentDidMount() {
        spotifyApi.getUserPlaylists()
        .then((response) => {
            const lists = response.items.map(
                obj => ({
                    name: obj.name,
                    cover: obj.images[0].url,
                    playlistUrl: obj.id
                })
            )

            this.setState({lists}) 
        })
    }
/*  Get userplaylist API 
        Getting the data using userplaylist. Getting the API results to object valvues and updating 
        the list array with the object values */
Get userplaylist API
Getting the data using userplaylist. Getting the API results to object valvues and updating
the list array with the object values
Get userplaylist API Getting the data using userplaylist . Getting the API results to object valvues and updating the list array with the object values
componentDidMount() {
        spotifyApi.getUserPlaylists()
        .then((response) => {
            const lists = response.items.map(
                obj => ({
                    name: obj.name,
                    cover: obj.images[0].url,
                    playlistUrl: obj.id
                })
            )
            this.setState({lists}) 
        })
    }
componentDidMount ( ) { spotifyApi . getUserPlaylists ( ) . then ( ( response ) => { const lists = response . items . map ( obj => ( { name : obj . name , cover : obj . images [ 0 ] . url , playlistUrl : obj . id } ) ) this . setState ( { lists } ) } ) }
Get userplaylist API
Getting the data using userplaylist.
Get userplaylist API Getting the data using userplaylist .