Package-level declarations

Types

Link copied to clipboard
class AtomSaveableStore(savedState: Bundle? = null) : AtomStore, SavedStateRegistry.SavedStateProvider

A AtomStore implementation that saves and restores the state of Atoms.

Link copied to clipboard
class AtomState<T>(state: State<T>, update: (T) -> Unit) : MutableState<T>

MutableState for handling the state values of Atom managed by AtomStore.

Link copied to clipboard
class AtomValue<T>(state: State<T>) : State<T>

State for handling the state values of Atom managed by AtomStore.

Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun AtomRoot(store: AtomStore, content: @Composable () -> Unit)

Provides a single AtomStore.

fun AtomRoot(primary: Pair<AtomScope, AtomStore>, vararg others: Pair<AtomScope, AtomStore>, fallbackScope: (Atom<*>) -> AtomScope = { primary.first }, content: @Composable () -> Unit)

Provides multiple AtomStore. You can provide AtomStore corresponding to AtomScope with different lifecycles.

Link copied to clipboard
fun <T> rememberAtomState(atom: Atom<T>, store: AtomStore = LocalAtomOwner.current): AtomState<T>

Remember an AtomState for the specified Atom reference key.

Link copied to clipboard
fun <T> rememberAtomValue(atom: AtomRef<T>, store: AtomStore = LocalAtomOwner.current): AtomValue<T>

Remember an AtomValue for the specified AtomRef reference key.

fun <T> rememberAtomValue(atom: Atom<T>, store: AtomStore = LocalAtomOwner.current): AtomValue<T>

Remember an AtomValue for the specified Atom reference key.

Link copied to clipboard

Remember a AtomSaveableStore that saves and restores the state of Atoms.

Link copied to clipboard