Framer-motion element appears multiple times #2733
Unanswered
Benjamintlj
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What am I trying to do & context?
I am currently making a personal website, and I wanted center this container. You can an example on Aceternity.
With a modified version this container centered, the container would jump.
As a result I have created the code found on Replit (it is commented with further details on how the code works).
What is the problem I am facing?
At random intervals (around every 1-7 cycles) the animation seems to bug out and create two instances of itself, for a single frame. As show in the images below.
image of bug
I have attempted to localise the problem, with no success. The glitch seems to last for around a single frame. I truly
have no clue and have been stuck on this for a while.
Problem file location?
./src/app/ui/title-section/vanishing-words.tsx
Or press this link.
Theories
onExitComplete
is being called multiple times, and it does not seem like it.b1
does seem to make it worse.image of second bug
Code that is likely causing the problem
I have reduced the code down to this minimal state and have still been finding them problem.
Stack-Overflow post
Link
Beta Was this translation helpful? Give feedback.
All reactions