Skip to content

When not properly unobserving there can be zombie components #20

@Eminenz

Description

@Eminenz

Consider http://jsfiddle.net/Jwtfc/5/

We construct a component tree consisting of a super component and a sub component but forget to spool the observation in the subcomponent.

After destroying the parent component and triggering the listener of the (destroyed) subcomponent, it is confused, because its' parent component is dead.
So it tries to revive it by increasing its' state in the tree.

Since we cut the link between "/" and the parent component, the parent component tries to register its' listener (again), but cannot bubble up the tree to the model, so it breaks.

I know its' intended to always have to unobserve (mostly that will be happening via unspooling), but I found it quite hard to link zombie components which cannot register listeners to a missing spool parameter when I tried to debug this bug.

My proposal would be to rather have an error message than try to increase the state of the parent component from "dead" to "created", maybe along the lines of "Triggering a listener on a dead component - did you forget an unspool?"

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions