docs: update useFetch return values (#21852)

This commit is contained in:
Lucas Vargas 2023-06-29 06:16:43 -03:00 committed by GitHub
parent 669e9bcf2d
commit 5f5b9dfe99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -65,11 +65,11 @@ Under the hood, `lazy: false` uses `<Suspense>` to block the loading of the rout
## Return Values
* **data**: the result of the asynchronous function that is passed in
* **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
* **error**: an error object if the data fetching failed
* **status**: a string indicating the status of the data request (`"idle"`, `"pending"`, `"success"`, `"error"`)
* **data**: the result of the asynchronous function that is passed in.
* **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.
* **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.

View File

@ -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.
* **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.
* **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.