Sanity Library Reference Docs
    Preparing search index...

    Like DefinedLiveProps but with includeDrafts required. Returned by defineLive({strict: true}).

    interface StrictDefinedLiveProps {
        action?: SanityLiveAction;
        includeDrafts: boolean;
        onError?: SanityLiveOnError;
        onGoAway?: false | SanityLiveOnGoaway;
        onReconnect?: false | SanityLiveOnReconnect;
        onRestart?: false | SanityLiveOnRestart;
        onWelcome?: false | SanityLiveOnWelcome;
        requestTag?: string;
        waitFor?: "function";
    }

    Hierarchy

    Index

    Properties

    Server action called for each content-change message from the Live Content API.

    The default action revalidates the cache tags produced by sanityFetch.

    includeDrafts: boolean

    Custom error handler. If none is provided, errors are logged with console.error. Pass 'throw' to throw errors during render so they can be caught by the unstable_catchError API.

    onGoAway?: false | SanityLiveOnGoaway

    Custom handler for the goaway event. Pass false to disable the default long-polling fallback.

    onReconnect?: false | SanityLiveOnReconnect

    Custom handler for the reconnect event. Pass false to disable the default log behavior.

    onRestart?: false | SanityLiveOnRestart

    Custom handler for the restart event. Pass false to disable the default refresh behavior.

    onWelcome?: false | SanityLiveOnWelcome

    Custom handler for the welcome event. Pass false to disable the default connection log.

    requestTag?: string

    Request tag used to identify the live EventSource request in Sanity Content Lake logs.

    If cacheComponents: true then the default value is 'next-loader.live.cache-components' otherwise it's 'next-loader.live'

    waitFor?: "function"

    Delays events until after a configured Sanity Function has processed them and called the callback endpoint. When omitted, events are delivered immediately.