react-spring icon indicating copy to clipboard operation
react-spring copied to clipboard

[bug]: Latest version of react-spring useTransition re-renders multiple times

Open Socvest opened this issue 3 years ago • 4 comments

Which react-spring target are you using?

  • [ ] @react-spring/web
  • [ ] @react-spring/three
  • [x] @react-spring/native
  • [ ] @react-spring/konva
  • [ ] @react-spring/zdog

What version of react-spring are you using?

9.4.5

What's Wrong?

When animating with useTransition, it appears that when I do the action that activates the animation, it re-renders multiple times. I have searched previous isssues on github and have seen many with this problem but not sure what exactly the solution is. Could I get some help as to why this is happening?

To Reproduce

(Look below at codesandbox link)

This is what the issue looks like Example

Expected Behaviour

I want it to behave like tihs

Link to repo

Repo/codesandbox

Socvest avatar Jul 12 '22 05:07 Socvest

Please provide a code reproduction of the your issue.

For guidance on how to do so see – https://stackoverflow.com/help/minimal-reproducible-example

I encourage you to use codesandbox.

joshuaellis avatar Jul 12 '22 07:07 joshuaellis

Please provide a code reproduction of the your issue.

For guidance on how to do so see – https://stackoverflow.com/help/minimal-reproducible-example

I encourage you to use codesandbox.

Thanks, I have attached the codesandbox to the original issue

Socvest avatar Jul 12 '22 13:07 Socvest

I've checked your sandbox, i'll be honest it's still way too complicated. I think you need to boil it down to the pure issue you're facing all this hover and non-hover is confusing, it could be that or regular CSS thats the issue.

Considering no one else has reported this issue, and it seems you're using it in a regular way, I think I really need to see the simplest form of the issue to take this further.

joshuaellis avatar Jul 21 '22 15:07 joshuaellis

Thanks for trying. Not sure what the simplest form of the issue is but I think I might go for on click rather than hover.

Socvest avatar Aug 08 '22 04:08 Socvest

Closing due to inactivity

joshuaellis avatar Aug 31 '22 13:08 joshuaellis