StatefulComposable

fun <T : Any> StatefulComposable(state: UiState<T>, onShowSnackbar: suspend (String, SnackbarAction, Throwable?) -> Boolean, content: @Composable (T) -> Unit)

A composable function that represents a stateful UI component.

Parameters

T

The type of the data.

state

The current state of the UI.

onShowSnackbar

A suspend function to show a snackbar with a message and an action.

content

A composable function that defines the UI content based on the state data.