강의

멘토링

커뮤니티

Inflearn Community Q&A

zayden1223's profile image
zayden1223

asked

Learning React while making web games

7-2. Relationship between reducer, action, and dispatch

tableData를 map으로 실행할 때 Array를 사용하는 이유가 있나요?

Written on

·

220

2

//강의 내용
Array(tableData.length)
  .fill()
  .map((tr, i) => {
    return <Tr rowData={tableData[i]} />;
})

//이렇게 하지 않는 이유가 있나요?
tableData.map((tr, i) => {
  return <Tr rowData={tableData[i]} />;
})
react

Answer 1

1

zerocho님의 프로필 이미지
zerocho
Instructor

동작한다면 아래처럼 하시면 됩니다.

zayden1223's profile image
zayden1223

asked

Ask a question