shoes변경([...shoes, ...result.data]) 뒤에
console.log(shoes)를 쓰면
(3) [{…}, {…}, {…}]
0: {id: 0, title: "White and Black", content: "Born in France", price: 120000}
1: {id: 1, title: "Red Knit", content: "Born in Seoul", price: 110000}
2: {id: 2, title: "Grey Yordan", content: "Born in the States", price: 130000}
length: 3
이렇게 나오네요. ...result.data가 추가가 안 되는 거 같은데 어떡해야 할까요?
반복문은
{
Data.map((a,i)=>{
return <Item shoes={shoes[i]} i={i}/>
})
}
로 어레이 추가 시 갯수로 동작하는 거라 이상은 없어 보입니다..