If this is a major concern for you, you might want to use something like immutableJS[0]. More often than not I’ve found it unnecessary except in very contained parts of a large app, but in case it’s helpful I wanted to point it out.[0] - https://github.com/immutable-js/immutable-js
Accacin|6 years ago
[0] - https://github.com/immerjs/immer