Class component base for the VDOM renderer.
Subclasses should implement render(self) -> VNode.
Lifecycle hooks:
- on_mount(self)
- on_update(self, prev_props: dict)
- on_unmount(self)
add_cleanup(fn)
Register a cleanup callback to run on unmount.
on_mount()
Called after the component is first mounted.
on_unmount()
Called before the component is removed from the DOM.
on_update(prev_props)
Called after props update and render diff applied.