v2.0.0
Change status field name on previews and projections.
Sanity React App SDK
Breaking changes
The status
field in preview and projection results has been renamed to _status
to prevent collisions with user-defined status
fields and to follow the convention of using underscore prefix for system attributes.
Migrating from 1.x to 2.0.0
const {data} = useDocumentPreview({documentId: '123', documentType: 'product'})
console.log(data?.status?.lastEditedPublishedAt)
const {data} = useDocumentPreview({documentId: '123', documentType: 'product'})
console.log(data?._status?.lastEditedPublishedAt)
This change affects:
PreviewValue
interface- Projection results
- Preview results
Bug fixes and improvements
- Align release order with studio release order
- Updates various Sanity dependencies to their latest version.