Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry

I'm trying to delete an object from an array and the response I get is that the data is undefined in react.js ?

I'm trying to delete an object from an array and the response I get is that the data is undefined in react.js ?

Try this

  <User
              name={album.name}
              band={album.band}
              city={album.city}
              id={album.id}               <----- Add this line
              genresId={
                genres &&
                genres.map((g) => {
                  if (g.id === album.genresId) {
                    return g.name;
                  }
                  return "";
                })
              }
              onDelete={onDelete}
            />

9 0

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online