我有调用子组件的父部件classParentextendsComponent{constructor(props){super(props);this.data=this.getData();}getData(val){//thisiswheretheproblemscomewhensetting//valonthesecondrenderif(typeofval!="undefined"){returnval;}}render(){return();}}exportdefaultHome;在儿童组件中,我运行componentDidmount功能,因为我需要取代第一个渲染上呈现的DIV。在第