joshwcomeau / react-flip-move

Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
http://joshwcomeau.github.io/react-flip-move/examples
MIT License
4.09k stars 258 forks source link

Wrong position when add item quickly #244

Closed zhaoyao91 closed 4 years ago

zhaoyao91 commented 4 years ago

I've made a notification system with react-flip-move. It works fine if I add item one by one. But if I add items quickly, the position new item occurs is wrong.

see

Kapture 2020-02-17 at 18 50 53

tobilen commented 4 years ago

i suggest you solve this in your codebase by using some method of debounce, with the debounce timer being the length of your animation. here are three examples: