on Loading
Executes the given composable block if the State is State.Loading.
This is a convenience function to simplify conditional rendering based on the state.
Example usage:
val myState: State<String> = ...
myState.onLoading {
CircularProgressIndicator()
}Content copied to clipboard
Parameters
block
The composable block to execute if the state is Loading.