hzdg / react-imageloader

A React component for wrangling image loading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preloader vs Children

KeKs0r opened this issue · comments

Hi,

I am using this component for showing user profiles. I have a default user picture that should be shown when

  1. The user image is not yet loaded (with preloader)
  2. The user image could not be loaded (via children)

When I provide both, sometimes it happens that my default image is shown twice.
When the preloader is defined and an error occurs, does the picture than stay returned by the preloader function then stay?

hmm, #8 should prevent this from happening. That was merged in as of v1.2.0–are you using the latest version?