Package-level declarations

Types

Link copied to clipboard
external object BRAND_SYMBOL : Symbol
Link copied to clipboard
sealed external interface ReadonlySignal<out T>

An interface for read-only signals.

Link copied to clipboard
external class Signal<T>(var value: T = definedExternally) : ReadonlySignal<T>

The base class for plain and computed signals.

Functions

Link copied to clipboard
external fun <T> batch(fn: () -> T): T

Combine multiple value updates into one "commit" at the end of the provided callback.

Link copied to clipboard
external fun <T> computed(fn: () -> T): ReadonlySignal<T>

Create a new signal that is computed based on the values of other signals.

Link copied to clipboard
external fun effect(fn: () -> Unit): () -> Unit

Create an effect to run arbitrary code in response to signal changes.

Link copied to clipboard
external fun <T> signal(value: T): Signal<T>

Create a new plain signal.

Link copied to clipboard
external fun <T> untracked(fn: () -> T): T

Run a callback function that can access signal values without subscribing to the signal updates.