Architecting High-Performance Computed Properties: The 'Dirty Check' and Cache Management
Updated May 4, 2026
Short answer
Computed properties use a lazy evaluation strategy where they only re-calculate when a reactive dependency notifies them that it has changed ('dirty' state).
Deep explanation
Internally, a computed property creates a 'ComputedRefImpl' object. It has a _dirty flag. When a dependency changes, the dependency triggers the computed's effect, which simply sets _dirty = true without running the getter. The getter only executes when the computed property is actually accessed. Architecturally, you should avoid 'Side-Effect Computed' (changing other data inside a computed) as it breaks this lazy-load contract and can lead to infinite loops.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro