How to use onload in react?
Instead of rendering the image which you dont want, you could simply load it in componentDidMount like The above solution is just to call imageStore once an image is loaded. However if what you intend is to call imageStore when the component has fully loaded,just trigger this.imageStore() in componentDidMount