Which react-spring target are you using?
What version of react-spring are you using?
9.6.0
What's Wrong?
When using useTransition it does not seem to be possible to have different spring configs per property like stated in https://www.react-spring.dev/docs/advanced/config#config-per-springvalue .
To Reproduce
Consider this simple transition:
const transitions = useTransition(data, {
from: { opacity: 0, y: 2 },
enter: { opacity: 1, y: 0 },
leave: { opacity: 0, y: -2 },
config: (key) => {
return key === 'y' config.wobbly : { duration: 600 };
},
});
https://www.react-spring.dev/docs/advanced/config#config-per-springvalue states that a function-based config has access to the key of the animated property. In case of useTransition() the passed variable holds the value of data.
Expected Behaviour
We have access to the property key in function-based configs.
Link to repo
_
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.6.0
What's Wrong?
When using
useTransitionit does not seem to be possible to have different spring configs per property like stated in https://www.react-spring.dev/docs/advanced/config#config-per-springvalue .To Reproduce
Consider this simple transition:
https://www.react-spring.dev/docs/advanced/config#config-per-springvalue states that a function-based config has access to the key of the animated property. In case of
useTransition()the passed variable holds the value ofdata.Expected Behaviour
We have access to the property
keyin function-based configs.Link to repo
_