diff --git a/src/forest-common.jsx b/src/forest-common.jsx index 7533065..303463c 100644 --- a/src/forest-common.jsx +++ b/src/forest-common.jsx @@ -192,6 +192,10 @@ class ForestCommon extends Component { return core.object(this.UID, path, match); } + get(path, match) { + return core.object(this.UID, path, match); + } + notify(){ if(this.mounted) this.setState({}); } diff --git a/src/forest-core.js b/src/forest-core.js index f1e119d..da176f7 100644 --- a/src/forest-core.js +++ b/src/forest-core.js @@ -9,6 +9,7 @@ const log = { object: false, net: false, persist: false, + deltas: false, } function listify(...items){ @@ -292,6 +293,7 @@ function updateObject(uid, update){ const changed = !_.isEqual(o,p); const delta = changed && difference(o,p); if (changed) { + if(log.deltas) console.log('deltas:', { uid, delta }); deltas[uid] = (uid in deltas)? Object.assign(deltas[uid], delta): delta; } const notifiable = delta && Object.keys(delta).filter(e=>!notNotifiableProps.includes(e)).length || delta.Timer;