4 ms·
I was thinking that observing properties could be useful for hooking on to changes to some internal state that a third party library maintains, but doesn't prov
by lewisl9029 11y ago
I was thinking that observing properties could be useful for hooking on to changes to some internal state that a third party library maintains, but doesn't provide a callback for (for instance, for persistence and/or synchronization).
Is there a more idiomatic way to work around this in JS other than Object.observe if you don't want to resort to dirty checking or patching the library to provide a callback?
- bcherny 11y agoO.o seems like a bad option in your case, since not only would you be relying on an internal API that could change at any point, but you'd be relying on the shape of its internal data staying the same too.