reset method
void
reset()
Clears all registered components.
Call this before rebuilding the component tree or when tearing down the UI to avoid dangling references.
Implementation
void reset() {
context.componentInstances.clear();
context.hoveredComponent = null;
}