Stone.js API
    Preparing search index...

    Interface ServerLoaderOptions<DataType, EventType>

    Options controlling a server loader.

    interface ServerLoaderOptions<DataType = unknown, EventType = unknown> {
        fallback?: DataType;
        onError?: (error: unknown, context: ServerLoaderContext<EventType>) => void;
        policy?: ServerLoaderPolicy;
    }

    Type Parameters

    • DataType = unknown

      The data the loader returns.

    • EventType = unknown

      The incoming event type.

    Index
    fallback?: DataType

    Value used when the server load fails (and policy is not client-only).

    onError?: (error: unknown, context: ServerLoaderContext<EventType>) => void

    Observe failures (e.g. logging); never throws.

    Cross-boundary policy. Default server-first.