ref: reorganize store (based on different principles)

This commit is contained in:
Géry Debongnie
2019-04-11 13:08:00 +02:00
parent d49f5670fe
commit 03511ce9ea
4 changed files with 241 additions and 449 deletions
-13
View File
@@ -113,19 +113,6 @@ export function findInTree<T extends Tree<T>>(
return null;
}
export function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
const keysA = Object.keys(objA);
for (let key of keysA) {
if (!(key in objB) || objA[key] !== objB[key]) {
return false;
}
}
return true;
}
export function patch(C: any, patchName: string, patch: any) {
const proto = C.prototype;
if (!proto.__patches) {