Changed useNetworkState to implement a partial update mechanism

This commit is contained in:
Mitchell McCaffrey
2021-01-03 10:45:24 +11:00
parent 858c489980
commit 02ecf9bffc
3 changed files with 39 additions and 15 deletions

9
src/helpers/diff.js Normal file
View File

@@ -0,0 +1,9 @@
import { applyChange, diff as deepDiff } from "deep-diff";
export function applyChanges(target, changes) {
for (let change of changes) {
applyChange(target, true, change);
}
}
export const diff = deepDiff;