Value passing problem of react component

wrote a component of the broadcast graph, but never got the correct value when passing the value.
has a total of four pictures, and the img element has been rendered, but the imgNum=0,imgWidth=NAN,
picture data is obtained from the server through ajax. The
code is as follows:

<Banner imgNum={this.state.imgs.length} imgWidth={this.state.imgWidth}>
 {this.state.imgs.map((val,index) => (
    <img
        key={index}
        src={`${Tool.IP}/ydcsPhone/goodsInfo/downloadGoodsPicture?goodsInfoId=${this.gID}&goodsPictureName=${val}&session=${Tool.SESSION}`}
         alt=""
         style={{ float:"left",width:this.state.imgWidth,height:this.state.imgHeight}}
     />
 ))}
</Banner>
Feb.19,2022

should be pointing to the wrong this. The problem is solved by defining const self = this;
in render and then using style = {width: self.state.imgWidht}}


in img, because the data is obtained asynchronously through ajax, so it is passed to the parent component before it is obtained.

can be solved by making if judgment before loading the component.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35e2a-2b518.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35e2a-2b518.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?