Open Benwick91 opened 4 years ago
it is mentioned in documentation that you need to use object has function
As mentioned in #302 I use something like this (with lodash and hasha as dependency):
objectHash: function(obj) {
// this function is used only to when objects are not equal by ref
const newObj = _(obj).toPairs().sortBy(0).fromPairs().value();
const hash = hasha(JSON.stringify(newObj), {algorithm: "sha256"})
return hash;
}
Maybe it fits you?
Hey
I want to use the diff and patch functions for an undo function in my React-Redux project. It works fine, when I am deleting the last item, but not when I deleting the first one or an item inside.
For example I delete the first item:
The result of diff is:
But I want to get:
Is this possible? Thank you :)