- state는 수정할 데이터, 추가할 데이터 등 Dynamic Data를 작업할 때 쓰인다.
- function component를 class component로 바꾼다.
- react는 자동으로 class component의 render method를 실행한다.
- setState를 사용하면 새로운 값과 함께 페이지가 render 된다
- this는 현재 class에 포함된 함수/상수라는 뜻
'ReactJS > State' 카테고리의 다른 글
Component Life Cycle (0) | 2019.09.29 |
---|