Skip to content
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

Adds an unmount check to AnimatePresence prior to animation exit callback #796

Merged
merged 3 commits into from Oct 29, 2021

Conversation

ctrlplusb
Copy link
Contributor

@ctrlplusb ctrlplusb commented Oct 6, 2020

I was getting issues in my jest tests without this, due to state updates occurring on an unmounted component. My component under test had an exit animation that completed post unmount of the parent component.

I also fixed the tests that were causing console.error logs. Refactored them to use the "async act" test util. IMO, the existing tests need a few more cleanup / refactor rounds to utilize this same strategy. Unfortunately I don't have the capacity to help with that right now. I did at least refactor the tests that were producing console.error logs. 👍

Screenshot 2020-10-06 at 22 04 11

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 089e43b:

Sandbox Source
Framer Motion: Simple animation Configuration
App Store UI using React and Framer Motion Configuration
Framer Motion: Reorder animation Configuration
Framer Motion: growing item positionTransition issue Configuration
Framer Motion: Image lightbox Configuration

@mattgperry
Copy link
Collaborator

Sorry for the substantial delay, and thanks for submitting the PR!

@mattgperry mattgperry added the automerge Land this PR label Oct 29, 2021
@mergetron mergetron bot merged commit 35c9efa into framer:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Land this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants