sendPayload
Sends arbitrary payload data through the router as a one-shot effect.
⚠️ Experimental API: This API is experimental and may change or be removed in future versions.
This method allows sending typed payload data that can be observed using the oneShotPayloadStream
function. Useful for sending structured data that doesn't fit the standard Signal/Effect/Data pattern.
Parameters
D
The type of payload data to send
payload
The payload data to send
Example usage:
onSignal<ErrorSignal> { signal ->
sendPayload(ErrorInfo(signal.message, signal.code))
}
Content copied to clipboard
See also
for observing payloads