mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 00:23:53 +00:00
docs: update deep
default for useAsyncData
& useFetch
(#28564)
This commit is contained in:
parent
a4be2cb31b
commit
f85cb4d6ae
@ -72,7 +72,7 @@ const { data: posts } = await useAsyncData(
|
||||
- `getCachedData`: Provide a function which returns cached data. A _null_ or _undefined_ return value will trigger a fetch. By default, this is: `key => nuxt.isHydrating ? nuxt.payload.data[key] : nuxt.static.data[key]`, which only caches data when `payloadExtraction` is enabled.
|
||||
- `pick`: only pick specified keys in this array from the `handler` function result
|
||||
- `watch`: watch reactive sources to auto-refresh
|
||||
- `deep`: return data in a deep ref object (it is `true` by default). It can be set to `false` to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.
|
||||
- `deep`: return data in a deep ref object. It is `false` by default to return data in a shallow ref object for performance.
|
||||
- `dedupe`: avoid fetching same key more than once at a time (defaults to `cancel`). Possible options:
|
||||
- `cancel` - cancels existing requests when a new one is made
|
||||
- `defer` - does not make new requests at all if there is a pending request
|
||||
|
@ -108,7 +108,7 @@ All fetch options can be given a `computed` or `ref` value. These will be watche
|
||||
- `getCachedData`: Provide a function which returns cached data. A _null_ or _undefined_ return value will trigger a fetch. By default, this is: `key => nuxt.isHydrating ? nuxt.payload.data[key] : nuxt.static.data[key]`, which only caches data when `payloadExtraction` is enabled.
|
||||
- `pick`: only pick specified keys in this array from the `handler` function result
|
||||
- `watch`: watch an array of reactive sources and auto-refresh the fetch result when they change. Fetch options and URL are watched by default. You can completely ignore reactive sources by using `watch: false`. Together with `immediate: false`, this allows for a fully-manual `useFetch`. (You can [see an example here](/docs/getting-started/data-fetching#watch) of using `watch`.)
|
||||
- `deep`: return data in a deep ref object (it is `true` by default). It can be set to `false` to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.
|
||||
- `deep`: return data in a deep ref object. It is `false` by default to return data in a shallow ref object for performance.
|
||||
- `dedupe`: avoid fetching same key more than once at a time (defaults to `cancel`). Possible options:
|
||||
- `cancel` - cancels existing requests when a new one is made
|
||||
- `defer` - does not make new requests at all if there is a pending request
|
||||
|
@ -84,7 +84,7 @@ export interface AsyncDataOptions<
|
||||
*/
|
||||
immediate?: boolean
|
||||
/**
|
||||
* Return data in a deep ref object (it is true by default). It can be set to false to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.
|
||||
* Return data in a deep ref object (it is false by default). It can be set to false to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.
|
||||
*/
|
||||
deep?: boolean
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user