I want to know when an image has finished loading. Is there a way to do it with a callback?
If not, is there a way to do it at all?
If you are using React.js, you could do this:
render() {
// ...
this.onImgLoad({ item })}
onError={() => this.onImgLoad({ item })}
src={item.src} key={item.key}
ref={item.key} />
// ... }
Where: