rememberAtomValue

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

Remember an AtomValue for the specified Atom reference key.

Return

The AtomValue for the specified Atom reference key.

Parameters

T

The type of the state value.

atom

The reference key.

store

The AtomStore that manages the state using the atom reference key. By default, it resolves using LocalAtomOwner.


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

Remember an AtomValue for the specified AtomRef reference key.

Return

The AtomValue for the specified AtomRef reference key.

Parameters

T

The type of the state value.

atom

The reference key.

store

The AtomStore that manages the state using the atom reference key. By default, it resolves using LocalAtomOwner.