mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 07:59:33 +00:00
docs: update useFetch return values (#21852)
This commit is contained in:
parent
669e9bcf2d
commit
5f5b9dfe99
@ -65,11 +65,11 @@ Under the hood, `lazy: false` uses `<Suspense>` to block the loading of the rout
|
|||||||
|
|
||||||
## Return Values
|
## Return Values
|
||||||
|
|
||||||
* **data**: the result of the asynchronous function that is passed in
|
* **data**: the result of the asynchronous function that is passed in.
|
||||||
* **pending**: a boolean indicating whether the data is still being fetched
|
* **pending**: a boolean indicating whether the data is still being fetched.
|
||||||
* **refresh**/**execute**: a function that can be used to refresh the data returned by the `handler` function
|
* **refresh**/**execute**: a function that can be used to refresh the data returned by the `handler` function.
|
||||||
* **error**: an error object if the data fetching failed
|
* **error**: an error object if the data fetching failed.
|
||||||
* **status**: a string indicating the status of the data request (`"idle"`, `"pending"`, `"success"`, `"error"`)
|
* **status**: a string indicating the status of the data request (`"idle"`, `"pending"`, `"success"`, `"error"`).
|
||||||
|
|
||||||
By default, Nuxt waits until a `refresh` is finished before it can be executed again.
|
By default, Nuxt waits until a `refresh` is finished before it can be executed again.
|
||||||
|
|
||||||
|
@ -77,8 +77,9 @@ If you provide a function or ref as the `url` parameter, or if you provide funct
|
|||||||
|
|
||||||
* **data**: the result of the asynchronous function that is passed in.
|
* **data**: the result of the asynchronous function that is passed in.
|
||||||
* **pending**: a boolean indicating whether the data is still being fetched.
|
* **pending**: a boolean indicating whether the data is still being fetched.
|
||||||
* **refresh**/**execute** : a function that can be used to refresh the data returned by the `handler` function.
|
* **refresh**/**execute**: a function that can be used to refresh the data returned by the `handler` function.
|
||||||
* **error**: an error object if the data fetching failed.
|
* **error**: an error object if the data fetching failed.
|
||||||
|
* **status**: a string indicating the status of the data request (`"idle"`, `"pending"`, `"success"`, `"error"`).
|
||||||
|
|
||||||
By default, Nuxt waits until a `refresh` is finished before it can be executed again.
|
By default, Nuxt waits until a `refresh` is finished before it can be executed again.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user