[FEATURE] onAnimationComplete pass variant as param
See original GitHub issueCurrently I’m not sure how to determine which animation variant completed in the onAnimationComplete callback. For instance I’d like to know when the exit transition has fully completed inside AnimatePresence so I can disable scroll locking after closing a modal. In Pose I used:
onPoseComplete={thePose => {
if (thePose === "exit") {
doStuff();
}
}
Describe the solution you’d like Pass the related variant string as argument to onAnimationComplete like onPoseComplete?
Edit: Noticed I can use the onExitComplete callback on AnimatePresence itself but would still be useful to know which animation completed on a motion level.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6
Top Results From Across the Web
Motion components | Framer for Developers
Animate via a simple prop. Add drag, pan, hover and tap gestures. Respond to gestures with animations. Deeply animate throughout React trees via...
Read more >c++ - How to pass a variant as constructor parameter or as ...
I try to create a construction that take a variant parameter to initialize the state. However whent the constructor is defined , I...
Read more >Using Animation Events
These fields allow you to specify the name of the function you want to call, and the value of the parameter you want...
Read more >Framer Motion: Start an Animation on Hover
Well, we can now tell the div to start the animation, but it doesn't know what to animate. This is where animation variants...
Read more >How To Use std::visit With Multiple Variants and Parameters
... capabilities of this handy function: the basics, applying on multiple variants, and passing additional parameters to the matching function.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Published in 3.6
Any update on that one ? It’s too bad to have to use another external state in order to make the difference between the different states 😕