Server functions

broadcast

Declares a live server function whose answer is the same for every viewer: on the client exactly live(fn) — the sharing is the server's.

See Share one live answer across viewers for what is shared, what runs per caller, and the compile-time capture rule.


Import

import { broadcast } from "@solidjs/web/server-functions";

Type signature

function broadcast<A extends readonly any[], R>(
fn: (...args: A) => R
): LiveServerFunction<A, Awaited<R>>;

Parameters

fn

  • Type: (...args: A) => R

Learn more

Last updated: 10/28/26, 2:39 AMEdit this pageReport an issue with this page