You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If creating a cached property that is only consumed by one computed property (e.g. nothing else would cause it to recompute), specifying that property as a dependent key requires that the property be defined with both cached and dependentKeyCompat for it to work properly, like so:
This is expected—but likely worth documenting somewhere.
For other folks who hit this: any getter which only interacts with the auto-tracking system (which includes getters using @cached) will require @dependentKeyCompat for downstream computed properties to be updated: it's a necessary bridge between the "pull"-based system of Octane/auto-tracking, where everything between a tracked property and the reactivity layer (mostly templates) is totally ignorant of the reactivity in general, and the "push" based system (where we actively notified subscribers, who were also actively caching their dependent keys' values).
If creating a
cached
property that is only consumed by onecomputed
property (e.g. nothing else would cause it to recompute), specifying that property as a dependent key requires that the property be defined with bothcached
anddependentKeyCompat
for it to work properly, like so:The text was updated successfully, but these errors were encountered: