📅  最后修改于: 2022-03-11 15:04:11.608000             🧑  作者: Mango
//ChildExt component
class ChildExt extends React.Component {
render() {
return (
)}
}
//Parent component
class ParentExt extends React.Component {
constructor(props){
super(props);
this.state = {lol: false }
}
handleForUpdate(someArg){
this.setState({lol: true});
console.log(someArg);
}
//Notice how we don't pass the arguments into the bind.this even though it does take an argument.
render() {
return ( )
}
}