//組件加載的時候
constructor(props){
super(props)
this.state = {
msg:'張學友'
}
}
//組件將要掛載
componentWillMount(){
}
//數據渲染
render(){
}
//組件掛載完成的時候
componentDidMount(){
}
//組件數據更新的時候
//是否需要更新
shouldComponentUpdate(){
return true
}
//將要更新
componentWillUpdate(){
}
//更新完成
componentDidUpdate(){
}
render(){
}
//父組件里面改變props傳值的時候出發
componentWillReceiveProps(){
}
//組件銷毀
componentWillUnmount(){
}
