[bug]: Can't represent nullable values in spring

Author: LoganDarkCreated Jun 23, 2024Updated Jun 9, 2026
Labelstemplate: request

Which react-spring target are you using?

  • @react-spring/web
  • @react-spring/three
  • @react-spring/native
  • @react-spring/konva
  • @react-spring/zdog

What version of react-spring are you using?

9.7.3

What's Wrong?

When I set a spring to null, especially with immediate: true, I expect it to happen (undefined would also work).

To Reproduce

https://codesandbox.io/p/sandbox/lingering-fire-zr6ndd?workspaceId=80a9d860-12d9-4443-890c-a440aefb7d3c

Expected Behaviour

override spring should be set to null when override state is, but it is not.

Link to repo

https://codesandbox.io/p/sandbox/lingering-fire-zr6ndd?workspaceId=80a9d860-12d9-4443-890c-a440aefb7d3c