|
|
|
|
|
by Gehinnn
1130 days ago
|
|
I implemented the eager recomputation model for the observable utilities in vscode [1] and it quickly fell on my feet because of these glitches. In particular this is problematic if you have observable optional state that has inner observable/derived state and someone reactively reads the outer state and then it's inner if the outer one is defined. Then you clear and dispose the outer state and at the same time set some other observable value that the inner derived depends on.
With eager recomputation, it can now happen that the inner derived is recomputed, even though the inner state is disposed. [1] https://github.com/microsoft/vscode/blob/fe9154e791eafb4f18d... |
|
The other option is to use FrTime's approach and only update nodes in dependency order.