UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

14 lines (10 loc) 401 B
import {useMemoObservable} from 'react-rx' import {useDocumentStore} from '../store' /** @internal */ export function useDocumentOperationEvent(publishedDocId: string, docTypeName: string) { const documentStore = useDocumentStore() return useMemoObservable( () => documentStore.pair.operationEvents(publishedDocId, docTypeName), [documentStore.pair, publishedDocId, docTypeName], ) }