question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Emulating `Animated.loop()`

See original GitHub issue

I would like to loop an animation that isn’t going back and forth like the examples you provide. Is there a way to simulate a loop, ie. when an animation completes start over at the initial settings?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jmeistrichcommented, Jul 15, 2022

Ah ok, I see what you mean. It’s possible you could set the transition to duration 0 while resetting it to make it not animate during the reset:

transition={{
    type: 'timing',
    duration: 0
}}

But I haven’t actually tested that. It’s late here in Singapore so I’ll test that and think about it some more tomorrow.

0reactions
jmeistrichcommented, Jul 21, 2022

And use -1 for infinite looping?

Yes exactly, to match the Animated behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I emulate this color loop effect? - Stack Overflow
I think I need to use the LoopOut() expression for well, the loop, but I don't know how to animate the colors like...
Read more >
Get Started with React Native Animations | by Sean Groff
In this article we will cover how to get started using the Animated animation system provided by React Native. Local Setup. None! For...
Read more >
How To Emulate a Foreach Loop in JavaScript - CSS Reset
All we're doing is iterating through the array with the foreach() construct and replacing each item with the phrase “Do Something Here,” but...
Read more >
Confused about cycles and emulator 'game loop'. : r/EmuDev
Say your emulator program runs at 60 fps. If the game loop looks like this, while (!exit) cpu.executeInstruction() ppu.renderFrame().
Read more >
How Can You Emulate Do-While Loops in Python?
In this tutorial, you'll learn how to emulate do-while loops in Python. ... #include <stdio.h> int main() { int number; do { printf("Enter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found