plus1tv / react-anime

✨ (ノ´ヮ´)ノ*:・゚✧ A super easy animation library for React!
https://codepen.io/collection/nrkjgo/
MIT License
1.56k stars 80 forks source link

Mapping array inside <Anime /> on state update won't render #58

Open profran opened 5 years ago

profran commented 5 years ago

Today I tried to use the cascading list feature, which worked with an initial state, but it didn't work when updating the state.

I followed the steps written here: https://alain.xyz/libraries/react-anime

I created a codesandox to reproduce the issue: https://codesandbox.io/embed/github/profran/olimpiada-inet-2019/tree/master/

foxbunny commented 4 years ago

Not sure if we're talking about the same thing, but I've tried a nested list where each list possibly has multiple nested lists (basically a tree). Whenever I edit the state, the animation of all nodes simply fail to render and are removed from the page.

mhoritani commented 4 years ago

Same here. As soon as new props (items) are being passed, causing a re-render I get this error: TypeError: a is null

My suspicion is that it somehow wants to animate items that are unmounted, but they are not there anymore at that point.

Cheers ✌️