mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
docs: add note about useFetch
auto generated key (#7044)
This commit is contained in:
parent
f506b83dbd
commit
5650927c34
@ -44,7 +44,7 @@ type AsyncData<DataT> = {
|
|||||||
* `headers`: Request headers.
|
* `headers`: Request headers.
|
||||||
* `baseURL`: Base URL for the request.
|
* `baseURL`: Base URL for the request.
|
||||||
* **Options (from `useAsyncData`)**:
|
* **Options (from `useAsyncData`)**:
|
||||||
* `key`: a unique key to ensure that data fetching can be properly de-duplicated across requests, if not provided, it will be generated based on the `url` and fetch options.
|
* `key`: a unique key to ensure that data fetching can be properly de-duplicated across requests, if not provided, it will be generated based on the static code location where `useAyncData` is used.
|
||||||
* `lazy`: Whether to resolve the async function after loading the route, instead of blocking navigation (defaults to `false`).
|
* `lazy`: Whether to resolve the async function after loading the route, instead of blocking navigation (defaults to `false`).
|
||||||
* `server`: Whether to fetch the data on the server (defaults to `true`).
|
* `server`: Whether to fetch the data on the server (defaults to `true`).
|
||||||
* `default`: A factory function to set the default value of the data, before the async function resolves - particularly useful with the `lazy: true` option.
|
* `default`: A factory function to set the default value of the data, before the async function resolves - particularly useful with the `lazy: true` option.
|
||||||
|
Loading…
Reference in New Issue
Block a user