I'm working on a react native project, I found a solution on internet to my problem but I don't understand one line from a function
componentDidUpdate(propsOld) { // line 1
const { fill } = this.props; // line 2
const { fill:fillOld } = propsOld; // line 3
if (fill !== fillOld) { // line 4
Animated.timing(this.anim, { toValue:fill, duration:2000 // line 5 }).start();
}
}
The line that I don't understand is the line 3:
const { fill:fillOld } = propsOld;
I understand the use of curly braces when there is a single variable or multiple variables seperated by comma ',',
Would anyone please explain to me the meaning when they are separated by colon ':' ?