hmm.. I have tried a few things but cant get this to work... I know it should be simpler than I am making it.
I want to create an array without duplicates. Can you help me?
useEffect(() => {
allBands.forEach(band => {
if(!availableGenres.includes(band.bandGenre)){
setAvailableGenres(genres => [...genres, band.bandGenre])
}
})
}, [allBands])