Mario-Duarte / react-image-zooom

Simple React component that will allow users to zoom in on your images, perfect for product images and galleries!
https://mario-duarte.github.io/react-image-zooom/
27 stars 7 forks source link

Causes slide show to not move #7

Closed Dionne-Stratton closed 1 year ago

Dionne-Stratton commented 1 year ago

I have what amounts to a slide show functionality that allows my users to click left or right to view the next or previous image in the gallery. After swapping for my , the zoom works but the image doesn't change when hitting the left and right arrows, though all the rest of the data including the url updates. You can see how the slides should work here: https://serenityimages.studio/gallery/0

Mario-Duarte commented 1 year ago

I am sorry that you are having trouble with this, unfortunately without further details in regard to the issue I am unable to assist you.

Have you also tried other sliders like Swiper?

Dionne-Stratton commented 1 year ago

I don't know what "slider" you mean, it's just vanilla JS inside a react app with basic useState at the app level. The page has an array of objects (an image and details for the art piece) It displays the correct image and other data based on it's place in the array. I'm using a standard img tag to display the image normally. All I did was swap it based on the directions for using your image zoom and with your component, the image is not updating with the rest of the data when I move it though the array. The data updates as it should, including the image data, but your component does not render the new image.

Mario-Duarte commented 1 year ago

I am not able to replicate the issue when updating the src of the image on ImageZoom using the useState, here is a demo of this -> https://codepen.io/MarioDesigns/pen/xxQzxYN/30174463be80e9e34f634463dd9701c9

If you would create a demo of the issue and share it with me I would be happy to help.