sanity-extra
v1.0.0
Published
Extra APIs for Sanity.io.
Downloads
116
Readme
sanity-extra
Extra APIs for Sanity.io.
Installation
npm install sanity-extra
Components
<DocumentFormProvider />
TODO: documentation & examples
<DocumentEditorProvider />
TODO: documentation & examples
<SelectedInput />
TODO: documentation & examples
Hooks
useDocumentForm()
TODO: documentation & examples
useDocumentState()
TODO: documentation & examples
useDocumentValue()
TODO: documentation & examples
useDocumentList()
Props
defaultOrdering: SortOrderBy[]
filter: string
params: Record<string, unknown>
sortOrder?: SortOrder
apiVersion?: string
Example:
import {useDocumentList} from 'sanity-extra'
const list = useDocumentList({
filter: `*[_type == 'post']`,
})
useMiddlewareComponent()
TODO: documentation & examples
useResolveDefaultComponent()
TODO: documentation & examples
Functions
findField()
TODO: documentation & examples
getQueryResults()
TODO: documentation & examples
isDescendantOfType()
TODO: documentation & examples
isFieldMember()
TODO: documentation & examples
isMemberObject()
TODO: documentation & examples
Variables
EMPTY_RECORD
An empty record. This is useful when optimizing React components.
License
MIT © Marius Lundgård