ComponentRef

interface ComponentRef<C : Component<*>>

Inheritors

Types

Link copied to clipboard
class Null<C : Component<*>> : ComponentRef<C>

Null implementation of ComponentRef.

Link copied to clipboard
class Tracker<C : Component<*>> : ComponentRef<C>

Tracker implementation of ComponentRef

Functions

Link copied to clipboard
open fun get(): C

Gets the tracked component.

Link copied to clipboard
abstract fun getOrNull(): C?

Gets the tracked component or null.

Link copied to clipboard
open operator fun invoke(): C?

Shortcut for getOrNull

open operator fun <R> invoke(block: (C) -> R): R?

Execute code on the tracked component.

Link copied to clipboard
open fun track(tracker: ComponentRef.Tracker<C>): ComponentRef<C>

Tracks a component with the giver tracker.