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: useTrail should not run on initial render when a ref is passed #2026

Merged
merged 7 commits into from
Nov 21, 2022

Conversation

joshuaellis
Copy link
Member

Why

  • useTrail shouldn't animate on initial render when a ref is passed because this behaviour is identical to other hooks.

What

  • Fixes useTrail bug
  • Adds new demo (smile grid)

Checklist

  • Documentation updated
  • Demo added
  • Ready to be merged

@joshuaellis joshuaellis added the area: core relates to core classes // parts of the library label Nov 21, 2022
@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2022

🦋 Changeset detected

Latest commit: 0b30560

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@react-spring/core Patch
@react-spring/animated Patch
@react-spring/parallax Patch
@react-spring/rafz Patch
react-spring Patch
@react-spring/shared Patch
@react-spring/types Patch
@react-spring/konva Patch
@react-spring/native Patch
@react-spring/three Patch
@react-spring/web Patch
@react-spring/zdog Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 21, 2022

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

Name Status Preview Updated
react-spring-beta ❌ Failed (Inspect) Nov 21, 2022 at 8:23PM (UTC)
react-spring-io ✅ Ready (Inspect) Visit Preview Nov 21, 2022 at 8:23PM (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 558856a:

Sandbox Source
Animating Auto Configuration
Card Configuration
Cards Stack Configuration
Chaining Transition and a Spring Configuration
CSS Keyframes Configuration
Async CSS variables Configuration
Draggable List Configuration
Exit Before Enter Configuration
Flip Card Configuration
Floating Button Configuration
Goo Blobs Configuration
Image Fade Configuration
List Reordering Configuration
Masonry Grid Configuration
Multistage Transitions Configuration
Notification Hub Configuration
Horizontal Parallax Configuration
Sticky Parallax Configuration
Vertical Parallax Configuration
Rocket decay Configuration
Basic Transition Configuration
Native Slide Configuration
Smile Grid Configuration
Springy Boxes Configuration
Svg Filter Configuration

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 21, 2022

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 0b30560:

Sandbox Source
Animating Auto Configuration
Card Configuration
Cards Stack Configuration
Chaining Transition and a Spring Configuration
CSS Keyframes Configuration
Async CSS variables Configuration
Draggable List Configuration
Exit Before Enter Configuration
Flip Card Configuration
Floating Button Configuration
Goo Blobs Configuration
Image Fade Configuration
List Reordering Configuration
Masonry Grid Configuration
Multistage Transitions Configuration
Notification Hub Configuration
Horizontal Parallax Configuration
Sticky Parallax Configuration
Vertical Parallax Configuration
Rocket decay Configuration
Basic Transition Configuration
Native Slide Configuration
Smile Grid Configuration
Springy Boxes Configuration

@joshuaellis joshuaellis changed the title [fix]: useTrail should not run on initial render when a ref is passed fix: useTrail should not run on initial render when a ref is passed Nov 21, 2022
@joshuaellis joshuaellis merged commit feeb58b into master Nov 21, 2022
@joshuaellis joshuaellis deleted the fix/trail-refs branch November 21, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core relates to core classes // parts of the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant