AtomRoot
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.
To use the Remember API for handling Atom within content, it is essential to declare AtomRoot somewhere in the parent tree. The scoped store is provided to child components using the Remember API via LocalAtomOwner.
Parameters
primary
The specified AtomScope used preferentially as the default value for fallbackScope.
content
The content of the AtomRoot.
Provides a single AtomStore.
To use the Remember API for handling Atom within content, it is essential to declare AtomRoot somewhere in the parent tree. The store is provided to child components using the Remember API via LocalAtomOwner.