LifeCycle

inner class LifeCycle

Lifecycle hooks for components

Constructors

Link copied to clipboard
fun LifeCycle()

Types

Link copied to clipboard
inner class Hook

Hook with no callback parameters

Link copied to clipboard
inner class NextPropsHook

Hook for props update

Functions

Link copied to clipboard
operator fun invoke(block: Component.LifeCycle<PROPS>.() -> Unit)

Brings the LifeCycle object into scope.

Properties

Link copied to clipboard
val onMount: Component.LifeCycle.Hook<PROPS>

Hook called when the component was mounted

Link copied to clipboard
val onNextProps: Component.LifeCycle.NextPropsHook<PROPS>

Hook called when the component receives new props

Link copied to clipboard
val onUnmount: Component.LifeCycle.Hook<PROPS>

Hook called when the component was unmounted

Link copied to clipboard
val onUpdate: Component.LifeCycle.Hook<PROPS>

Hook called when the DOM of the component was updated