How to Detect when All Images are Loaded in a React Component

onLoad, onErrror events, the after decorator, and more

Photo by the author, Sorrento, Italy

In this post, I will aim to detect when several images are fully loaded inside a React function component. Be aware that simply rendering an image tag (<img />) does not mean that the image was loaded.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store