-1
I was doing a project and asked him to use a "key", I put it and always gave the error of Warning: Each child in a list should have a unique "key" prop
, then I looked at the stack overflow to see more and realized that the key should be unique, I gave a console.log, but the result was different numbers and an error
Code:
<div className="page">
<section className="lists">
{movieList.map((item, key) => (
<div>
{item.name}
<MovieRow key={key}/>
</div>
))}
</section>
</div>
)
follow console.log(key)
the
Key
ai is in thediv
– novic