Which react-spring target are you using?
What version of react-spring are you using?
9.4.5
What's Wrong?
I tried using the to spring "variables" named scale3dValue and translate3dY to use for interpolation to come up with a final transform value. It doesn't work. The value itself springs from start to finish, but it disrupts the creation of a final transform.
Changing it to less descriptive variables like o (described here: https://react-spring.io/basics#view-interpolation), xyz, a, b, etc. works. Why?
To Reproduce
const [props, api] = useSpring(() => ({
from: {
// Had this be 'a: 0', and every `scale3dValue` below replaced with `a`,
// the transform would apply just fine.
scale3dValue: 0,
},
})
// Later, say in an event callback, particularly with the use of interpolation.
props.transform.set(
props.scale3dValue.to(value => `scale3d(${value})`)
)
api.start({ scale3dValue: 1 })
/*
I'd imagine similar behavior from the following
return <animated.div
style={{
transform: scale3dValue.to(value => `scale3d(${value})`)
}}
/>
*/
Expected Behaviour
The creation of the final transform value not be disrupted by what variable named are used, as long as they are not CSS style props.
Link to repo
https://codesandbox.io/s/focused-estrela-yy950s?file=/src/App.js
Which react-spring target are you using?
@react-spring/web@react-spring/three@react-spring/native@react-spring/konva@react-spring/zdogWhat version of react-spring are you using?
9.4.5
What's Wrong?
I tried using the
tospring "variables" namedscale3dValueandtranslate3dYto use for interpolation to come up with a finaltransformvalue. It doesn't work. The value itself springs from start to finish, but it disrupts the creation of a finaltransform.Changing it to less descriptive variables like
o(described here: https://react-spring.io/basics#view-interpolation),xyz,a,b, etc. works. Why?To Reproduce
Expected Behaviour
The creation of the final
transformvalue not be disrupted by what variable named are used, as long as they are not CSS style props.Link to repo
https://codesandbox.io/s/focused-estrela-yy950s?file=/src/App.js