Rxova
Skip to content

useSend

function useSend<M, R>(channel): <K>(type, payload, options?) => void;

The channel’s post function (stable identity per channel).

Type Parameter
M extends MessageMap
R extends Partial<Record<keyof M, unknown>>
ParameterType
channelChannel<M, R>
<K>(
type,
payload,
options?): void;

Fire-and-forget to every other tab/window/worker on this origin.

Type Parameter
K extends string
ParameterType
typeK
payloadM[K]
options?PostOptions

void