setState

protected fun setState(reducer: State.() -> State)(source)

Updates the current state using a reducer function.

Example

setState {
copy(isLoading = true)
}