Relative Content

Tag Archive for javascriptreactjsframer-motion

Why is the text cycle I created in FramerMotion and React overlapping at seemingly random times?

I am trying to create an infinite text cycle in React using FramerMotion, showing one word at a time, and cycling to the next word every three seconds. The code below works like a charm a lot of the time, but if I leave the page open, change some windows, do some other stuff, etc, and then come back, often multiple words from the words array are displayed on the page at the same time, and are overlapping one another. I have been wrestling with this for too long now, and can’t seem to figure out what makes this happen, or even how to trigger it happening. Anyone have any ideas??