rememberDispatcher
Provides access to the store's dispatch function for firing actions.
Example:
@Composable
fun CounterButtons() {
val dispatch = rememberDispatcher()
Row {
Button(onClick = { dispatch(CounterAction.Increment) }) {
Text("Increment")
}
Button(onClick = { dispatch(CounterAction.Decrement) }) {
Text("Decrement")
}
}
}Content copied to clipboard
Return
The dispatch function from the store