赞
踩
this.setState({age:12},()=>{console.log(this.state.age);//=>12})
let {age,name}=this.props;
ComponentName.defaultProps = { name:18, title: propsTypes.string.isRequired//类型检查 必传参数 }