Skip to content

Commit

Permalink
docs: small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 28, 2023
1 parent d8f37e4 commit 3eb6098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/1.getting-started/6.data-fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When using a framework like Nuxt that can perform calls and render pages on both

### Network calls duplication

The `useFetch` and `useAsyncData` composables ensure that once an API call is made on the server, the data is properly forwarded to the client in the payload. This JavaScript object is accessible through [useNuxtApp.payload](/docs/api/composables/use-nuxt-app#payload) and is used on the client to avoid refetching the same data when the code is executed in the browser.
The `useFetch` and `useAsyncData` composables ensure that once an API call is made on the server, the data is properly forwarded to the client in the payload. This JavaScript object is accessible through [`useNuxtApp().payload`](/docs/api/composables/use-nuxt-app#payload) and is used on the client to avoid refetching the same data when the code is executed in the browser.

::alert{icon=⚙️}
Use the [Nuxt DevTools](https://devtools.nuxtjs.org) to inspect this data in the payload tab.
Expand Down Expand Up @@ -197,7 +197,7 @@ To get the cached data by key, you can use [`useNuxtData`](/docs/api/composables

#### Refresh and execute

If you want to fetch or refresh data manually, use the `execute` or `refresh` function provided by the composables. `execute` and `refresh` methods work exactly the same.
If you want to fetch or refresh data manually, use the `execute` or `refresh` function provided by the composables. (`execute` is an alias for `refresh` that works in exactly the same way but is more semantic for cases when `immediate: false`).

```vue
<script setup>
Expand Down

0 comments on commit 3eb6098

Please sign in to comment.