formkit / auto-animate

A zero-config, drop-in animation utility that adds smooth transitions to your web app. You can use it with React, Vue, or any other JavaScript application.

Home Page:https://auto-animate.formkit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React.Children.map issue

asmyshlyaev177 opened this issue · comments

Hi, tnx for library, it's good.

But having an issue when children are remapped, take a look on example https://codesandbox.io/p/sandbox/festive-elion-9lhxw5?file=%252Fsrc%252FApp.tsx and https://asmyshlyaev177.github.io/react-horizontal-scrolling-menu/?path=/story/examples-itemsanimation--items-animation

I'm adding empty divbetween children for using it with scrollIntoView api.

This is a key issue. The root repeated items need to have a unique key — currently they are just cycling dom elements.