vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias LoaderContext

    Per-record channel handed to a loader handler, bound to the record and location of this run — so it cannot be misattributed when a navigation and a query refetch overlap. Optional, and appended last: handlers written against the four-argument signature keep working untouched.

    type LoaderContext = {
        revalidate: (fresh: Promise<unknown>) => void;
    }
    Index
    revalidate: (fresh: Promise<unknown>) => void

    Report a background refresh behind stale data you are returning now. The engine flips router.isRevalidating and patches snapshot.data when the promise resolves — dropping it if the location has since changed, and leaving the stale data in place if it rejects. Without this a stale-while-revalidate response would refresh the HTTP cache but never the page.