Runs while the node is attached, right before the composition reuses its component for different content or deactivates it. Drop state tied to the old content; onDetach follows.
A throw is reported to the thread's uncaught-exception handler, as if this had returned.