# Api Reference
# useContent
Provides full handling for CMS data fetching.
const { content, search, loading, error } = useContent(id)
# content
Storing fetched data from CMS.
- Type:
Array
- Default:
[]
# search
Fetching data from CMS.
- Type:
Function
- Arguments:
url
: Page URL slug- Type:
String
- Type:
locale
: Locale (optional)- Type:
String
- Default:
en_us
- Type:
custom
- Custom search config (use instead ofurl
, optional)- Type:
CustomSearch
- Default:
{}
- Type:
customQuery
- Custom GROQ query (see more GROQ docs (opens new window), optional)- Type:
String
,
- Type:
CustomSearch: {
type: string; // name of custom type
field: string; // name of field to search
value: string; // value of field to search
}
# loading
Data fetching loading indicator.
- Type:
ComputedProperty<Boolean>
- Default:
false
# error
Data fetching error object.
- Type:
ComputedProperty<any>
- Default:
{}
# RenderContent
Will render the CMS data to the Vue.js components.
<render-content :content="content" />
# content
Passing fetched CMS data.
- Type:
ComputedProperty<Array<any>>
- Default:
[]
- Behavior: Prop (opens new window)