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

fix: useTransition would not obey refs #1944

Merged
merged 2 commits into from
Jul 21, 2022
Merged

Conversation

joshuaellis
Copy link
Member

Why

When attaching refs to useTransition the animations were automatically starting regardless of the fact they shouldn't be.
This meant animations were freely running when they shouldnt be.

This problem could be the cause of #1933

What

  • Adds test to ensure animation does not start when a ref is attached
  • reattaches refs to controllers when transitions are apparent when the component is mounted

Checklist

  • Documentation updated
  • Demo added
  • Ready to be merged

Sorry, something went wrong.

@vercel
Copy link

vercel bot commented Jul 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-spring-io ✅ Ready (Inspect) Visit Preview Jul 21, 2022 at 3:08PM (UTC)

@codesandbox-ci
Copy link

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 c3ec09e:

Sandbox Source
spring-animating-auto Configuration
spring-card Configuration
spring-cards-stack Configuration
spring-chain Configuration
spring-css-keyframes Configuration
spring-goo-blobs Configuration

@joshuaellis joshuaellis merged commit 7a9dff3 into master Jul 21, 2022
@joshuaellis joshuaellis deleted the fix/react-18-use-transition branch July 21, 2022 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: React 18 StrictMode logic seems incorrect
1 participant