React rendering component, image cache problem?

The

scenario is as follows:
Route-sharpbase to an information filling page, and only upload the image. After the image is uploaded successfully, when you switch to-sharphome, and then to-sharpbase page, the picture still exists. From a business point of view, when you switch back to-sharpbase again, the head_ Picture value is empty, but after react rendering, there are images on the dom.

clipboard.png

tried setState ({head_pic: ""}) in componentDidMount and did not solve it.


did you write the picture information in the global similar redux?


does not. The picture is in the sub-component


after the upload page is successfully uploaded, the route switch belongs to the component Unmount, only the value in state is destroyed, but this data change will not actively trigger your update of the component, that is, the resulting instance has not changed. It is recommended that after the manual upload is completed, operate on the state to generate a new instance, and then the image will not be remembered.

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-1b3bd79-34692.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-1b3bd79-34692.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?