Is there a good way to approach the following concept:
var computed = ko.computed(function() {
readSomeObservables();
ko.stopCollectingDependencies();
readSomeMoreObservables();
ko.resumeCollectingDependencies();
});
I know peek(), but in this case, the computed method calls the methods that were provided from the external module, and the design requires that it be purely random if these methods are related to observables.
I have one solution that should roughly do this:
window.setTimeout(function() {
readSomeMoreObservables();
}, 0);
But for obvious reasons, this is hardly ideal and leads to unwanted behavior in some situations.
Rex m source
share