If the component unmounts before the image is loaded, the refs will be null.
This is because React calls the ref callbacks with null as the component
unmount.
We use this component in a virtualized list using React Virtualize. You can scroll through the list really fast, meaning that we sometimes mount and unmount components in an instant.
If the component unmounts before the image is loaded, the refs will be
null
. This is because React calls the ref callbacks withnull
as the component unmount.We use this component in a virtualized list using React Virtualize. You can scroll through the list really fast, meaning that we sometimes mount and unmount components in an instant.