Skip to content

Slider is re-rendering but not rendering new images unless nav buttons are clicked #77

Open
@AyoCodess

Description

@AyoCodess

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?

  const nextPost = () => {
    setPostImageArray(posts[postIndex + 1].images);
    setPostCaption(posts[postIndex + 1].caption);
    setPostIndex(postIndex + 1);
  };

Screenshot 2022-04-11 at 16 25 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions