-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animation does not loop when native drivers are used #28517
Comments
|
Confirmed with the following (latest) versions. Updating the original commment:
|
Same here with RN 0.62.1 |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
This is still an issue. And it has been confirmed on the latest version. The labels should be updated. |
On my first attempt to build a similar animation, I ran into the same issue. If I wrap Animated.loop around Animated.timing, it seems to work, but my animation is wrong now. Wrapping Animated.loop around Animated.stagger doesn't work with nativeDriver |
I just stumbled onto this as well. Loops correctly when not using native drivers. |
Animated.sequence([
Animated.timing({
...something,
useNativeDriver: true
}),
Animated.timing({
duration: 0,
..reset position,
useNativeDriver: true
}),
...loop iterations count
]) I just solved by NOT using |
I'm encountering a similar issue when adding Here's my example code for the animation
|
wrapping loop directly around timing fixes it for me on |
Description
Building a fairly complex "pulsing" animation, which includes nested calls to
Animated.loop
,Animated.sequence
,Animated.stagger
,Animated.parallel
, and finallyAnimated.timing
. This animation works as expected withuseNativeDriver
set to false. Unfortunately, when set to true, the animation only plays once and never loops.I have attempted to find a workaround, and while I can get a simple animation with just a
loop
andtiming
to repeat with native drivers, once I introduceparallel
,stagger
, orsequence
it stops repeating. I have not confirmed 100% that every combination of those three functions break looping in native, but suffice to say I have been unable to find a workaround.I have also tried looping with a recursive call passed to
start
instead ofAnimated.loop
. This doesn't make any difference, and also does not repeat whenuseNativeDriver
is set to true.React Native version:
Steps To Reproduce
Animated.timing
animationuseNativeDriver
to true within the timing's optionsAnimated.parallel
,Animated.stagger
,Animated.sequence
Animated.loop
Expected Results
Animation should repeat
Code Example
The text was updated successfully, but these errors were encountered: