withState

fun <T> StateContainer<T>.withState(action: (T) -> Unit)

Executes an action with the current state.