Question: Can proxy-memoize hand IF statements ?
jtwigg opened this issue · comments
jtwigg commented
Example
const fn = memoize(obj => {
if(obj.test > 10) {
return obj.a
} else {
return obj.b
}
});
given that the value's that are "touched" are conditional, obj.b
can't be known to be accessed by magical recursive walk that's performed?
Will this cause inconsistencies?
Daishi Kato commented
Yes, it can handle conditional cases.
"touched" (we call it "affected") is rebuilt from empty on re-evaluation.
It's not that magical.