This demo is used to check whether the download of a large image can be aborted. This is needed for performance when using React, otherwise the browser in stacking pending image downloads, which can cause an accumulation is delayed image renders.
This demo shows an Image-React solution and a plain javascript DOM
solution. To test, open the Developer Tools and open the network tab, so
that you can see that the image starts downloading and that it can be
aborted.
For plain JS, click "start", then you see the image is being downloaded.
Then while downloading, click "clear", and you'll see that the download
aborts immediately, as expected.
The other demo, the Image-React demo, works by showing the image and
hiding the image. Showing the image starts the download, and hiding it
should cause it to be unmounted, and the unmount code of Image-React
should cancel the download by clearing src attribute. But this doesn't
seem to happen, the image continues to be downloaded.