Thanks Elijay, this has been pointed out to me by a few people. I've misused the word, 'immutable' in this post. The data isn't immutable, there's just no link back to the original data.
Also, I'm not trying to suggest using any of these deep copying techniques. It was more to point out that the spread operator didn't do quite what I thought it did.
I may go back and try to firm up these points and change my wording. It's causing a bit of confusion.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks Elijay, this has been pointed out to me by a few people. I've misused the word, 'immutable' in this post. The data isn't immutable, there's just no link back to the original data.
Also, I'm not trying to suggest using any of these deep copying techniques. It was more to point out that the spread operator didn't do quite what I thought it did.
I may go back and try to firm up these points and change my wording. It's causing a bit of confusion.