localStoreOf
Create a CompositionLocal key that can be provided using androidx.compose.runtime.CompositionLocalProvider for a Store.
An example for providing a Store:
val LocalStore = localStoreOf<Store<State, Action>>()
@Composable
fun App() {
val store = remember { Store(reducer) }
CompositionLocalProvider(LocalStore provides store) {
// content
}
}
Content copied to clipboard