Sanity Library Reference Docs
    Preparing search index...

    Interface NodeDiffProps<Annotation>

    Props that encapsulate changes in the node's value.

    interface NodeDiffProps<Annotation> {
        __unstable_computeDiff: ComputeDiff<Annotation>;
        __unstable_diff: Diff<Annotation>;
        changed: boolean;
    }

    Type Parameters

    • Annotation

    Hierarchy (View Summary)

    Index

    Properties

    __unstable_computeDiff: ComputeDiff<Annotation>

    A function that takes any value and produces a diff between that value and the value the node is being compared to.

    This can be used to compute a diff optimistically.

    This is marked as unstable because the API may need to evolve as we iterate on the advanced version control functionality. It will be stabilised when that project has matured.

    __unstable_diff: Diff<Annotation>

    The diff between the current value and the value the node is being compared to.

    This is marked as unstable because the API may need to evolve as we iterate on the advanced version control functionality. It will be stabilised when that project has matured.

    changed: boolean

    Whether the current value is different to the value the node is being compared to.