-클래스형 컴포넌트
react 컴포넌트를 선언하는 방식에는 함수 컴포넌트
/ 클래스 컴포넌트
두 가지 방식이 있다.
-객체지향 프로그래밍-oop
-this
console.log(this) => window 객체를 가리킴
일반함수에서 this는 실행주체에따라 동적으로 바뀜 .bind(this)필요
화살표함수는 코드상(언어적)으로 바뀌지 않음
render
그리기
componentDidMount
그리고 난 뒤
그리고 난 뒤 변경 → componentDidUpdate
그리고 난 뒤 사라짐 → componentWillUnmount