joshwcomeau/react-flip-move

animation don't happen in react 16

csepulv opened this issue · 2 comments

I've been having trouble in React 16. As part of diagnosing my situation, I looked for working examples. I found this CodePen: https://codepen.io/anon/pen/WgoGLx

It uses React 15.0.2 and it works fine.

But if I update to React 16, the elements no longer animate. Here is the same pen, with React 16
https://codepen.io/csepulv/pen/oPYVKe

Any idea what going on or what I am missing?

thanks

Ahh, hm.

This does appear to be a bug. I think it was missed earlier since this isn't a "primary" usecase for Flip Move (the general way it's used is for removing or shuffling items in a list, not translating between onscreen positions). It's still a totally reasonable way to use Flip Move, though.

I think that's true because I notice items are properly removed from the list when I filter out the "selected" key before mapping. Which isn't the animation you want, but I just wanted to validate that it was an issue with that.

Sadly I don't foresee having the time to dig much into this =( busy with other projects and preparing a talk for the next few weeks. I would check out some other libraries that might be able to help with this:

Sorry about that!

thanks for your response