Open LoyalPotato opened 1 year ago
@joshuaellis Is there any way that I can help? I'm not sure where to look to fix this :)
I haven't looked too much into it at this point, but I imagine for some reason the DOM Position
type which is a union of strings
is not being correctly understood by the animated
types of the web
target – https://github.com/pmndrs/react-spring/blob/master/targets/web/src/animated.ts so somewhere in this file will probably need tweaking, I think...
Try using,
from:{ position: 'absolute' as const }
Can we do something about this ? Why do we need to const
it ?
Can we do something about this ? Why do we need to
const
it ?
You probably need to submit a PR to avoid using const
.
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.5.5
What's Wrong?
Setting
position: "absolute"
in thefrom
property of theuseTransition
hook shows a typescript error when settingstyle
on the animated div.To Reproduce
Set
position: "absolute"
in thefrom
property of theuseTransition
hook.Expected Behaviour
No errors
Link to repo
https://codesandbox.io/s/youthful-gianmarco-y5q1v2?file=/src/App.tsx