How can I update custom animation has defined with Animatable.initializeRegistryWithDefinitions?
Example:
Animatable.initializeRegistryWithDefinitions({
rateAnimation: {
0: {
color: "#aaa",
scale: 1
},
0.25: {
scale: 1.5
},
0.5: {
scale: 1
},
0.75: {
scale: 0.5
},
1: {
color: rateColor,
scale: 1
}
}
});
rateColor changes every render, but rateAnimation never changes. How can I update rateAnimation?
Hey, you're probably better of passing this animation as a prop instead.
<Animatable.View animation={{
0: { color: "#aaa", scale: 1 },
0.25: { scale: 1.5 },
0.5: { scale: 1 },
0.75: { scale: 0.5 },
1: { color: rateColor, scale: 1 }
}} />
@oblador that is great!
Are you on the latest version? The above works locally for me.
@oblador it's working with different style props
Okie, closing this for now then :-)
Most helpful comment
Hey, you're probably better of passing this animation as a prop instead.