useCmsDocument
A published CMS document by slug, in options.locale or else the runtime's
language. Waits while slug is empty; a new CMS locale reads it again.
Kind: React hook
Package: @ovok/core
Import
import { useCmsDocument } from '@ovok/core';
TypeScript signatures
<T extends object = OvokCmsDocument>(collection: string, slug: string | undefined, options?: OvokCmsOptions): OvokRequestState<T>
| Parameter | Type | Details |
|---|---|---|
collection | string | — |
slug | string | undefined | — |
options | OvokCmsOptions | — |
Returns: OvokRequestState<T>.
Learn the workflow
Continue with React for the workflow context and examples.