[React Error] React limits the number of nested updates to prevent infinite loops.
2020. 9. 6. 19:41ㆍJavaScript/React
onClick 이벤트에서 발생한다
<button onClick={removeDetailInput()}
이렇게 호출하면 에러가난다.
메게변수 입력시에도
<button onClick={removeDetailInput(index)}
가아니라
<button onClick={()=>removeDetailInput(index)}
로 사용을해줘야합니다!
'JavaScript > React' 카테고리의 다른 글
why state change dosen't (not) re render child component (0) | 2021.01.17 |
---|---|
[Material UI] react-slick Slide 이미지 dot customize (0) | 2020.12.29 |
[React] GraphQL + React + fetchMore infinite Scroll 페이지네이션 (0) | 2020.12.26 |
[Material UI] Typography vertical center 정렬 (0) | 2020.12.25 |
Reducer에서 Json의 특정 Key값을 지우는 방법 (0) | 2020.08.31 |