pmndrs / react-spring

✌️ A spring physics based React animation library
http://www.react-spring.dev/
MIT License
28.05k stars 1.19k forks source link

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

Open LoganDark opened 3 months ago

LoganDark commented 3 months ago

Which react-spring target are you using?

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