[bug]: useTransition not working if called with dependency array
Nobody has claimed this yet.
- 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.1
What's Wrong?
useTransition springs are not starting if called with a dependency array in >=v9.5.0. It works as expected and documented <=v9.5.0.
To Reproduce
Open codesandbox
Click the toggle button (nothing happens)
Switch to v 9.5.0
Click toggle button again (a div is animating in)
Expected Behaviour
I expected useTransition to animate if the state in the dependency array changes.
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 linked CodeSandbox and the useTransition entry point, comparing behavior between react-spring 9.7.1 and 9.5.0 when a dependency array changes. Done means the web target animates the div after toggling with the dependency array, matching the documented behavior in 9.5.0.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100