Sanity Library Reference Docs
    Preparing search index...

    Interface PerspectiveContextValueBeta

    interface PerspectiveContextValue {
        excludedPerspectives: string[];
        perspectiveStack: StackablePerspective[];
        selectedPerspective: SelectedPerspective;
        selectedPerspectiveName: string;
        selectedReleaseId: string;
    }
    Index

    Properties

    excludedPerspectives: string[]
    perspectiveStack: StackablePerspective[]

    The stacked array of perspectives ids ordered chronologically to represent the state of documents at the given point in time. It can be used as the perspective param in the client to get the correct view of the documents.

    ["published"] | ["drafts"] | ["releaseId2", "releaseId1", "drafts"]

    selectedPerspective: SelectedPerspective
    selectedPerspectiveName: string
    selectedReleaseId: string

    The releaseId as r<string>; it will be undefined if the selected perspective is published or drafts