let a = this.state.a;
//setted in the constructor: {number: 1}
console.log(a);
//Prints: {number: 1}
a.number = 2;
console.log(this.state.a);
//Prints: {number: 2}
How can I prevent a
to be a reference, I want to change de value of a
whitout changing the value of state.a