Open klis87 opened 4 years ago
The options setting for clone to false is also very useful for us when we merge large json structures for performance reasons.
Totally agree, I'm using react too... can you kindly explain the reasons why this has been set as deprecated? Thank you in advance
I think the clone option should be extended to take a function that defines how things are cloned. In the code I gave in #204 I had to set to clone to false so that this lib wouldn't try to clone sets and maps like normal objects. Ideally, I'd like to tell tell it how to clone these types rather than telling it not to clone all together.
Thx for great library, it works great. The only thing I am worried about is deprecating
clone
. I am using this library for merging 2 states inside redux. If some path of a merged object was not affected by merging, I need this object not to be copied, as then reference stays the same which is very important for optimisations likePureComponent
in React or inreselect
. To better put what I am talking about: