StoreProvider

fun StoreProvider(store: Store, content: @Composable () -> Unit)(source)

Provides the Reaktiv store to the Compose hierarchy via CompositionLocal.

Wrap your app's root composable with StoreProvider to make the store accessible to all child composables.

Example:

@Composable
fun App(store: Store) {
StoreProvider(store) {
NavigationRender(modifier = Modifier.fillMaxSize())
}
}

Parameters

store

The Reaktiv Store instance

content

The composable content that will have access to the store