Skip to content

Support immediate useResize #2375

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

Merged
merged 1 commit into from
May 27, 2025
Merged

Support immediate useResize #2375

merged 1 commit into from
May 27, 2025

Conversation

LoganDark
Copy link
Contributor

Why

I'm already using an interpolation to transition between two container heights, so I don't need the heights themselves to animate.

What

Before this PR, when useResize is used like useResize({ container: thingRef, immediate: true }) it just ignores the immediate option, even though TypeScript suggests that immediate should work.

This PR makes useResize respect that option if it is passed.

Checklist

  • Documentation updated: N/A; the types already suggest this is possible
  • Demo added: N/A; I don't think this should need an example
  • Ready to be merged

Copy link

changeset-bot bot commented May 23, 2025

🦋 Changeset detected

Latest commit: 6c75b2e

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

This PR includes changesets to release 11 packages
Name Type
@react-spring/core Patch
@react-spring/animated Patch
@react-spring/parallax Patch
@react-spring/rafz 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

Copy link

vercel bot commented May 23, 2025

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

Name Status Preview Updated (UTC)
react-spring ✅ Ready (Inspect) Visit Preview May 23, 2025 10:14am

@joshuaellis joshuaellis merged commit 7cc1c90 into pmndrs:next May 27, 2025
14 checks passed
@LoganDark LoganDark deleted the patch-1 branch May 27, 2025 08:06
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.

2 participants