So I am trying to make it so when you click the search button, it displays all the artist's names but when I click search nothing happens. When I do
console.log(artistsArray.name);
it gives me a list of all the artist's names for the search query so I'm not sure what I am missing; I am also new so sorry if I didn't explain well.
this is my search function
searchAlbums(){
spotifyWebApi.searchAlbums(this.state.value)
.then((response) => {
return response.albums.items.map((t) => {
return t.artists.map((artistsArray, index) => {
this.render({
render(){
return (
<div>
<li key={artistsArray.name}>
{artistsArray.name}
</li>
</div>
)
}
})
});
});
});
}
and here is the button
<button class=btn btn-small type=button onClick={() => this.searchAlbums()}>Search</button>