updateState

abstract suspend fun updateState(transform: suspend S.() -> S)

Obtain the current StateProvider.state and update it with the result of transform.

updateState<State.Subtype, _> { }
  • If you wish to ignore plugins and thread-safety of state updates in favor of greater performance, see ImmediateStateReceiver.updateStateImmediate.

See also

updateStateImmediate