[bug]: Can't represent nullable values in spring
Open
Nobody has claimed this yet.
template: request
- Dominant language
- TypeScript
- Stars
- 29.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
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
Expected Behaviour
override spring should be set to null when override state is, but it is not.
Link to repo
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the @react-spring/web target on version 9.7.3 and reproduce the behavior in the linked CodeSandbox. Trace how an override handles null or undefined, especially with immediate updates; done means the spring value reflects the override state when it is set to null or undefined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100