addBeforeDisposeHook

abstract fun addBeforeDisposeHook(hook: () -> Unit): Boolean

The supplied function is called before the component is disposed.