Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Incorrect behavior when changing elements in the slider #65

Description

@zavsievich

I have an array of arrays. I'm rendering the child arrays as slider elements. When I change the state, I change the array that the slider renders. Instead of swapping elements, it renders new slides internally, bloating the DOM and duplicating navigation elements.
This behavior is reproduced if slider elements have a unique key. If you remove the key (react swears on this), the bug doesn't reproduce.

Representation:
https://codesandbox.io/s/dawn-paper-y8pld4?file=/src/App.js

image

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