scaleflex / react-cloudimage-responsive

Cloudimage Responsive will smartly resize, compress and accelerate images across the World in your site for all devices. The plugin supports lazy loading technique with fancy animation on image load. Any questions or issues, please report to https://github.com/scaleflex/react-cloudimage-responsive/issues
MIT License
45 stars 15 forks source link

Update component if the source changed #3

Closed dgorczyca closed 5 years ago

dgorczyca commented 5 years ago

We have encountered a bug where once we swap the source of an image (hover over or click) the Cloudimage Img tag does not update in react. This line here: https://github.com/scaleflex/react-cloudimage-responsive/blob/c07eb0556230c0cb78650ae32f456336a0b08639/src/index.js#L37 should be extended with the extra check proposed in this pull request.

Quick turnaround with a new tag would be appreciated.

dzmitry-stramavus commented 5 years ago

@dgorczyca, thanks!

dzmitry-stramavus commented 5 years ago

@dgorczyca , available in v1.3.6