pmndrs / react-spring

✌️ A spring physics based React animation library
http://www.react-spring.dev/
MIT License
27.73k stars 1.18k forks source link

[bug]: useTransiton TS error #2290

Closed Mrcxt closed 2 weeks ago

Mrcxt commented 3 weeks ago

Which react-spring target are you using?

What version of react-spring are you using?

"@react-spring/web": "^9.7.3",

What's Wrong?

useTransition cannot automatically infer types correctly

To Reproduce

image

Expected Behaviour

Hope to be able to automatically infer the type

Link to repo

no

joshuaellis commented 2 weeks ago

it needs to be added to the from array.

Mrcxt commented 2 weeks ago

I don't quite understand, could you provide an example?