seniorVue.js

Handling 'Zombie Children' and Component Teardown in Complex Viewport Logic

Updated May 4, 2026

Short answer

Zombie children are component instances that persist in memory after their parent has been unmounted due to uncleared global references.

Deep explanation

This occurs most often in 'Virtual List' implementations or 'Keep-Alive' scenarios. If a child component registers a listener on a global event bus or a ResizeObserver but doesn't unregister it, the component instance cannot be garbage collected. Senior developers must implement strict 'Teardown' contracts using onUnmounted or onBeforeUnmount for all external side effects.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Vue.js interview questions

View all →