Closed d4rky-pl closed 1 year ago
sorry i don’t exactly get the issue (or where moti comes in)
react navigation is historically very slow when toggling tabs. it’s hard to navigate when it does
consider firing the animation after a navigation change event
For me, Sequences just stop working.
Can you open a new issue with a reproduction? I don’t know how to address this one.
For what it’s worth, it’s useful to wrap components in useMemo
. Maybe Reanimated 3 helps too.
Is there an existing issue for this?
Current Behavior
This is just my theory for now as I did not manage to create a repro but it seems that if the CPU thread gets busy during animation, the animations can sometimes get out of sync or finish too early and are then broken on all subsequent transitions. This seems to happen both with
animate
prop and with hooks.In my case it was a screen with multiple
List.Item
fromreact-native-paper
and the rendering happened inreact-navigation
tab bar but I'm still trying to narrow it down for a repro.Expected Behavior
The sequence animations should always work in a predictable manner
Steps To Reproduce
animate
prop oruseDynamicAnimation
hook. Make sure the animation duration is short (in my caseduration: 75
) or the issue will not trigger.Versions
Screenshots
In demo below, clicking on the servers icon (which renders a react-navigation tab with more content) triggers the glitch:
https://github.com/nandorojo/moti/assets/284395/0225a92e-b149-478c-9019-8ff34211784b
The demo was recorded on latest moti with #286 but I can confirm the problem also happens on
0.24.2
Reproduction
I'm still working on repro as I can't seem to be able to isolate the problem during the weekend. I will try to provide it in the coming days. I'm creating this issues just to flag that the problem is there in case you're able to reproduce it on your end.
The animation was defined like this: