static getDerivedStateFromProps(nextProps, prevState) {
console.log('getDerivedStateFromProps',nextProps, prevState)
}
componentDidMount() {
console.log('componentDidMount',this.props, this.state)
}
shouldComponentUpdate(nextProps, nextState) {
console.log('shouldComponentUpdate',nextProps, nextState)
return true
}
getSnapshotBeforeUpdate(prevProps, prevState){
console.log('getSnapshotBeforeUpdate',prevProps, prevState)
return 222
}
componentDidUpdate(prevProps, prevState,snapshot) {
console.log('componentDidUpdate',prevProps, prevState,snapshot)
}
render(){
return <React.Fragment>地图Component</React.Fragment>
}
getDerivedStateFromProps {orderId: "35201366854752"} {}
componentDidMount {orderId: "35201366854752"} {}
getDerivedStateFromProps {orderId: 2} {}
shouldComponentUpdate {orderId: 2} {}
getSnapshotBeforeUpdate {orderId: "35201366854752"}ref: (...)orderId: "35201366854752"get ref: ƒ ()proto: Object {}
componentDidUpdate {orderId: "35201366854752"} {} 222
相关文章
- 10-27react-native app 屏幕适配方案(按照设计稿像素大小写就行)
- 10-27Android性能分析与优化笔记 - 5 布局优化
- 10-27WPF学习笔记(8):DataGrid单元格数字为空时避免验证问题的解决
- 10-27论文阅读笔记(四十九)【CVPR2020】:Hi-CMD: Hierarchical Cross-Modality Disentanglement for Visible-Infrared Perso
- 10-27【C++学习笔记1】
- 10-27opencv学习笔记(第一天)
- 10-27python 入门笔记
- 10-27Python collections.defaultdict 笔记
- 10-27一个伟大的发现,装X一下。笔记本win7系统64位机器执行unity 时,屏幕模糊解决的方法
- 10-27Flutter学习笔记(37)--动画曲线Curves 效果