# 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:
id- Entry ID (use instead ofurl)- Type:
String
- Type:
preview- Preview URL, none cached (optional)- Type:
String
- Type:
locale- Locale KEY, localization key (optional)- Type:
String
- Type:
custom- Custom search config (use instead ofurlorid, optional)- Type:
CustomSearch - Default:
{}
- Type:
CustomSearch: {
value: string // value of field to search
}
# loading
Data fetching loading indicator.
- Type:
Boolean - Default:
false
# error
Data fetching error object.
- Type:
Object - Default:
{}
# RenderContent
Will render the CMS data to the Vue.js components.
<render-content :content="content" />
# content
Passing fetched CMS data.
- Type:
Array - Default:
[] - Behavior: Prop (opens new window)