Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: useTransition not working if called with dependency array #2189

Open
1 of 5 tasks
sators opened this issue Aug 17, 2023 · 1 comment
Open
1 of 5 tasks

[bug]: useTransition not working if called with dependency array #2189

sators opened this issue Aug 17, 2023 · 1 comment
Labels
template: bug This issue might be a bug

Comments

@sators
Copy link

sators commented Aug 17, 2023

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

https://codesandbox.io/s/loving-snyder-6llsgg

@sators sators added the template: bug This issue might be a bug label Aug 17, 2023
@sators
Copy link
Author

sators commented Aug 17, 2023

Similar to #2171 but with working codesandbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template: bug This issue might be a bug
Projects
None yet
Development

No branches or pull requests

1 participant