Async set state
You are looking at the logic behind my search functionality. The highlighted part of my code is not working the way its supposed to.
Every time there is a new search I would like to empty out my playlist array and assign it to the new results returned from the server.
Currently the new results are being appended to the older results.
Any ideas on how to get around this or what would be best practice in this case?
Thanks
0 Replies