diff --git a/docs/content/3.docs/1.usage/1.data-fetching.md b/docs/content/3.docs/1.usage/1.data-fetching.md index 7fa4b563bd..b24e821810 100644 --- a/docs/content/3.docs/1.usage/1.data-fetching.md +++ b/docs/content/3.docs/1.usage/1.data-fetching.md @@ -18,6 +18,7 @@ const { pending: Ref, refresh: (force?: boolean) => Promise, error?: any + watch: WatchSource[] } = useAsyncData( key: string, handler: (ctx?: NuxtApp) => Promise, @@ -35,6 +36,7 @@ const { * _server_: whether to fetch the data on server-side (defaults to `true`) * _transform_: a function that can be used to alter `handler` function result after resolving * _pick_: only pick specified keys in this array from `handler` function result + * _watch_: watch reactive sources to auto refrash Under the hood, `lazy: false` uses `` to block the loading of the route before the data has been fetched. Consider using `lazy: true` and implementing a loading state instead for a snappier user experience. diff --git a/examples/use-async-data/app.vue b/examples/use-async-data/app.vue index 673d4689e7..86020c0f70 100644 --- a/examples/use-async-data/app.vue +++ b/examples/use-async-data/app.vue @@ -1,5 +1,6 @@