This commit is contained in:
2021-06-03 23:49:19 +08:00
parent 232f389d9d
commit dfcabfe471
+5 -1
View File
@@ -17,9 +17,11 @@ class App extends React.Component{
}]
}
}
// 官方不建议使用
UNSAFE_componentWillMount(){
console.log('UNSAFE_componentWillMount');
}
// 官方不建议使用
UNSAFE_componentWillReceiveProps(newProps){
console.log(newProps);
}
@@ -45,7 +47,9 @@ class App extends React.Component{
}
changeShow(){
this.setState({bShow:!this.state.bShow})
this.setState({bShow:!this.state.bShow},()=>{
console.log(this.state.bShow)
})
}
render(){
//dangerouslySetInnerHTML