update State
Updates the saga state atomically.
The transform function receives the current state and should return the new state. This operation is atomic and thread-safe.
Example
updateState { currentState ->
currentState.copy(
paymentAmount = payment.amount,
escrowCaptured = true
)
}Content copied to clipboard
Return
The new state after transformation
Parameters
transform
Function that transforms current state to new state