diff --git a/docs/pages/3.usage.md b/docs/pages/3.usage.md index 669c27f4..f81be3ce 100644 --- a/docs/pages/3.usage.md +++ b/docs/pages/3.usage.md @@ -377,6 +377,12 @@ const total = await count('restaurants') > Check out the Strapi v3 [Count entries](https://docs-v3.strapi.io/developer-docs/latest/developer-resources/content-api/content-api.html#count-entries) REST API endpoint. + + +All examples above are demonstrated with http calls in script setup. However, to handle SSR properly you may want to use [useAsyncData](/advanced#async-data). + + + ## `useStrapiGraphQL` This composable is an alias of `useStrapiClient` that sets the `url` to `/graphql` and `method` to `POST`. You can use this method to send an authenticated GraphQL query to your API. diff --git a/docs/pages/4.advanced.md b/docs/pages/4.advanced.md index 376a3225..5cc57c77 100644 --- a/docs/pages/4.advanced.md +++ b/docs/pages/4.advanced.md @@ -3,6 +3,25 @@ title: Advanced description: 'Real-life advanced usages of the strapi module.' --- +## Async data + +To take full advantage of server-side rendering, you can use Nuxt [useAsyncData](https://v3.nuxtjs.org/docs/usage/data-fetching#useasyncdata) composable: + +```vue + +``` + ## Auth middleware You can protect your authenticated routes by creating a custom plugin in your project, here is an example: