본문 바로가기

오류처리/react 오류처리

TypeError: 'x' is not iterable

https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Errors/is_not_iterable

 

TypeError: 'x' is not iterable - JavaScript | MDN

TypeError

developer.mozilla.org

 

 

typeof 로 해당 콘솔 출력 결과 object라고 떠서 해결방법을 찾아보니 (filter로 돌리고 있었음, 위와 같은 에러 나옴)

map 으로 구현해보라는 mozilla의 조언이다