diff --git a/packages/docs/src/guide-composable/query.md b/packages/docs/src/guide-composable/query.md index bcc6267..e434972 100644 --- a/packages/docs/src/guide-composable/query.md +++ b/packages/docs/src/guide-composable/query.md @@ -167,7 +167,9 @@ Beware that `result` may not contain your data! At the beginning, it will be `un ``` -## Loading & Error state +## Query status + +### Loading state Alongside `result`, `useQuery` returns `loading` which is a boolean `Ref`, so you can track the loading state of the query: @@ -208,6 +210,8 @@ export default { ``` +### Error + There is also an `error` `Ref` that stores any error that may occur: ```vue{7,21,30} @@ -258,15 +262,14 @@ A sister composition function `useResult` is available alongside `userQuery` to The first useful feature of `useResult` is picking one object from the result data. To do so, pass the `result` data as the first parameter, and a picking function as the third parameter: -```vue{3,19,22,32,33} +```vue{2,18,21,34,35}