SyntaxHighlighter.all();

Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Archives
Total
Today
Yesterday
관리 메뉴

Component Life Cycle 본문

ReactJS

Component Life Cycle

데브케이션 2018. 10. 30. 21:44

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