Fetching Content
The module exposes an @prismicio/client
instance. You can access it through the globally available usePrismic()
composable:
app.vue
<script setup>
const { client } = usePrismic()
</script>
Use this instance to fetch content from your Prismic repository inside Nuxt useAsyncData()
composables within your pages, components, and plugins:
*.vue
<script setup>
const { client } = usePrismic()
const { data: home } = await useAsyncData('home', () => client.getByUID('page', 'home'))
</script>