FlashList layout animation bug React Native

692 views Asked by At

I'm developing a chat application that use inverted FlashList to render messages and I want to animate the layout once a new message is sent, but I'm having some problems.

Expo Snak

Bug Report on Github

Once I add a new message to the list, when user press on button "Send" I want to add a new message and perform a layout animation, here's a snippet of the button callback:

setMessages([{ content: message }, ...messages]);

listRef.current?.prepareForLayoutAnimationRender();
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
0

There are 0 answers