fix: inconsistent observable behavior when used with getter #7035
Labels
area:fast-element
Pertains to fast-element
bug
A bug
status:needs-investigation
Needs additional investigation
🐛 Bug Report
I recently stumbled on a strange behavior where this code works:
but not this one:
meaning that only the first example properly reacts when
myObservable
's value changes.💻 Repro or Code Sample
https://stackblitz.com/edit/vitejs-vite-davib1?file=src%2Fmain.ts
To elaborate on the scenario:
myGetter
is updated but should not triggerwhen
(so no need to make it an observable).myObservable
is the one whose value should drive the template updates.🤔 Expected Behavior
Both expressions should result in the same behavior.
💁 Possible Solution
I didn't have time to dig into the observable implementation, sorry. Maybe some kind of memoization is involved?
The text was updated successfully, but these errors were encountered: