leonardokl / react-palette

Extract prominent colors from an image
https://leonardokl.github.io/react-spotify-background
172 stars 29 forks source link

Images loaded twice (in my carousel) #11

Open oudoulj opened 4 years ago

oudoulj commented 4 years ago

I have a react-slick carousel loading a couple of images. I noticed that as soon as I add const { data, loading, error } = usePalette(url); to my code, images are loaded twice.

This can easily be witnessed/tested on that page https://codesandbox.io/s/react-slick-with-palette-53j28 by commenting out (or activating) line 19 (with usePalette, at this time of writing)

palette

palette_network

Is it a known issue and how can I prevent this ? Thank you !