Can someone help me in understanding the reason why someone would iterate when it's value is equal to it?
for example
let subStyle = {
width: 300,
height: 50,
borderRadius: 20,
backgroundColor: theme.primaryBlue
};
subStyle = {
...subStyle,
backgroundColor: theme.primaryWhite,
borderWidth: 2,
borderColor: '#707070'
}
i.e in the above code, what could be the reason for doing the same?
subStyle = {
...subStyle,
backgroundColor: theme.primaryWhite,
borderWidth: 2,
borderColor: '#707070'
}