A composite tree. A component owns children; three of the four
lifecycle phases (afterMount / graphReady / destroy) recurse into
them automatically. mount is the exception — it needs a per-child slot,
so addChild mounts each child explicitly instead. A parent declares its
children via addChild and their lifecycle is driven for it.
A disposable registry. Anything registered via track / listen
(event unsubscribes, DOM listeners, timers) is torn down on
destroy.
Subclasses override the on* hooks rather than the lifecycle methods
themselves, so the recursion and teardown always run.
Base class for every UI element. It provides:
children; three of the four lifecycle phases (afterMount/graphReady/destroy) recurse into them automatically.mountis the exception — it needs a per-child slot, soaddChildmounts each child explicitly instead. A parent declares its children viaaddChildand their lifecycle is driven for it.track/listen(event unsubscribes, DOM listeners, timers) is torn down on destroy.Subclasses override the
on*hooks rather than the lifecycle methods themselves, so the recursion and teardown always run.