Sanity Library Reference Docs
    Preparing search index...
    • Fan N per-doc stores into one useSyncExternalStore source keyed by id: one subscribe across all entries, and a memoised Map snapshot rebuilt only when an entry changes. Each adapter supplies the store-specific per-doc DocStore (App SDK getDocumentState, Studio editState), while the shared observer layer owns fan-out and snapshots.

      Parameters

      Returns DocStore<ReadonlyMap<string, ObservedDoc>>