You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have modal which displays the image slider, i have a button that is called 'next post' which should render a new image slider and other info in the modal.
what happens is the slider gets re-rendered, the bullet points reflect the right number of new images in the new post, but the new images do not render unless i click the slider nav buttons. Can anyone help?
The text was updated successfully, but these errors were encountered:
AyoCodess
changed the title
Slider not rendering new images
Slider is re-rendering but not new images unless nav buttons are clicked
Apr 11, 2022
AyoCodess
changed the title
Slider is re-rendering but not new images unless nav buttons are clicked
Slider is re-rendering but not rendering new images unless nav buttons are clicked
Apr 11, 2022
I found a way to solve the issue. You need to pass a key property, that changes anytime the images change as well. Here is an example I made. I am using useMemo to map my images here, but you get the idea
I have modal which displays the image slider, i have a button that is called 'next post' which should render a new image slider and other info in the modal.
what happens is the slider gets re-rendered, the bullet points reflect the right number of new images in the new post, but the new images do not render unless i click the slider nav buttons. Can anyone help?
The text was updated successfully, but these errors were encountered: