[bug]: Imperative .start() doesn't account for delay
Open
Nobody has claimed this yet.
area: core
kind: bug
- 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.0.0
What's Wrong?
I have a spring which should be delayed when called through the imperative .start(). But it seems like the delay value gets ignored. Is this expected? Is this by design?
To Reproduce
const [springProps, animate] = useSpring(() => ({
from: { opacity: 0 },
to: { opacity: 1 },
delay: 5000
})
// Bunch of code later
animate.start()
Expected Behaviour
When .start() is called, a delay happens before the animation triggers.
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 by reproducing the example with @react-spring/web, a 5000 ms delay, and imperative animate.start(). Trace the imperative start behavior and add a regression test for the delay; done means the delay is honored when .start() is called.
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