Skip to content

docs(core): clarify null/undefined goals are skipped, not animated#2528

Merged
joshuaellis merged 1 commit into
nextfrom
docs/2295
Jun 9, 2026
Merged

docs(core): clarify null/undefined goals are skipped, not animated#2528
joshuaellis merged 1 commit into
nextfrom
docs/2295

Conversation

@joshuaellis

@joshuaellis joshuaellis commented Jun 9, 2026

Copy link
Copy Markdown
Member

Documents the long-standing contract that null/undefined (and false) in a spring goal mean "leave this value alone" rather than a target to animate towards — a spring cannot animate to null. This surfaces in #2295, where the silent skip is mistaken for a bug.

The note is added to the existing "Any type is valid…" paragraph on the SpringValue page, which is where the animatable-types behaviour is already described.

Why

  • The skip semantics are intentional and type-supported (GoalValues<T> allows | null), but undocumented for users.
  • Animating a numeric value toward null is meaningless — there is nothing to interpolate to — so null is reserved for partial updates that leave a key untouched.
  • Points users at the correct pattern: keep nullable state in React and drive the spring from it.

Related issues

@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3d6c552

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-spring Error Error Jun 9, 2026 6:38am

Request Review

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Docs preview: https://pr-2528---react-spring-204644970562.europe-west1.run.app

Deployed at 43b28f4798d270200f78664a81a4d454918d5288. Updates on every push.

@joshuaellis joshuaellis merged commit 5c39616 into next Jun 9, 2026
12 of 13 checks passed
@joshuaellis joshuaellis deleted the docs/2295 branch June 9, 2026 06:45
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]: Can't represent nullable values in spring

1 participant