push는 변수(원본)을 바꾸고
concat은 변수(원본)은 건드리지 않고 새로운 변수를 만듬
그래서 나중에 사용할 때에 push의 경우에는 문제가 생길 수 있어 concat을 더 선호
'IT > 코딩복습(일기)' 카테고리의 다른 글
21.01.06 machine learning test, React:immutable (0) | 2021.01.07 |
---|---|
21.01.05 shouldComponentUpdate, teachable machine(google) (0) | 2021.01.06 |
21.01.03 props vs. state, CRUD (0) | 2021.01.04 |
21.01.02 React_ component event (0) | 2021.01.03 |
21.01.01 React 복습 (0) | 2021.01.02 |