3 ms·
also let us suppose I have the following .one span {color: red} .one span {color: purple} inside of a CSS file. Again I don't think I could consider that as
by bryanrasmussen 10mo ago
also let us suppose I have the following
.one span {color: red}
.one span {color: purple}
inside of a CSS file.
Again I don't think I could consider that as mutating state.
This is mutating state
let color = "red";
if (x} {
color = "purple";
}
because it mutates the variable value at run time based on something else.
The variable at different parts of the program have different values.
If you read .one span with the CSSOM in the above example it will always return color: purple.
That is not a mutated value, that is poorly written code that has been compiled down.