LifeCycle

class LifeCycle<PROPS>

Lifecycle hooks for components

Constructors

Link copied to clipboard
fun LifeCycle()

Types

Link copied to clipboard
class Hook

Hook with no callback parameters

Link copied to clipboard
inner class NextPropsHook<PROPS>

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

Hook called when the component was mounted

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

Hook called when the component receives new props

Link copied to clipboard
val onUnmount: Component.LifeCycle.Hook

Hook called when the component was unmounted

Link copied to clipboard
val onUpdate: Component.LifeCycle.Hook

Hook called when the DOM of the component was updated