As you know, we use destructuring to use the values in objects with ES6. I wonder about its depth.
When I write the code below:
let (or const) { firstVar, secondVar } = this.props
does it allocate new space in memory or does it use these values like pointers?
In the past, when I wrote
let { options } = this.props
options.splice(0,20)
I noticed that the variable in props had changed although my compiler had errors like 'props are Readonly' on different cases. How could it be possible?