Component Life Cycle 본문
Component Life Cycle
## Render
componentWillMount(){
console.log("component will mount") //1
}
render() {
console.log("render") //2
}
componentDidMount(){
console.log("component Did mount") //3
}
## Update
componentWillReceiveProps(){
//new props
}
shouldComponentUpdate(){
//old props, new props 비교
}
componentWillUpdate(){
// 비교 후 다르면 업데이트 진행
}
render(){
// new props 그리고
}
componentDidUpdate(){
// 업데이트 완료
}
'ReactJS' 카테고리의 다른 글
Ajac in React, Fetch, promise (0) | 2018.11.03 |
---|---|
Component State (0) | 2018.10.30 |
컴포넌트 , Props (0) | 2018.10.30 |
ReactJS 설치 (0) | 2018.10.29 |
Comments