ArunMichaelDsouza/react-image-appear

Image stays the same after src is changed

MocanuMarius opened this issue · 3 comments

Probably the component is not reacting to props being changed, so if i use this for a slider or something where the src={} changes, it stays the same. I would say this is a pretty big problem.

One easy fix is to set key={{imgSrc}} so that it triggers a react re-render, but it's by far the optimal solution here. The framework needs to be aware of src changes and treat it differently.

@MocanuMarius Any chance you can replicate it in a codepen? I can take a look at this sometime this week when I get a chance.

Closing due to inactivity.