rememberStore

Retrieves the Store from the CompositionLocal provided by StoreProvider.

Example:

@Composable
fun MyComponent() {
val store = rememberStore()
val scope = rememberCoroutineScope()

Button(onClick = {
scope.launch {
store.navigation { navigateTo("profile") }
}
}) {
Text("Go to Profile")
}
}

Return

The Store instance from the current composition

Throws

if called outside of a StoreProvider