From cb3a3f65b99e7e1e1f8402071bb074fd4c44f3be Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 00:11:20 +0000 Subject: [PATCH 1/5] docs: Note Vue's mounted useSuspense keeps data after invalidate Vue can't re-suspend a mounted component, so useSuspense keeps returning its current data while an invalidated endpoint refetches. Add that carve-out to the invalidate/invalidateAll JSDoc, the useSuspense behavior table, and Controller's ExpiryStatus.Invalid notes. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Tj5PXbDEpJbnwML9CXTHFb --- .../references/Controller.vue.md | 2 +- .../data-client-vue/references/Controller.md | 2 +- .../data-client-vue/references/useSuspense.md | 14 +++++++------ docs/core/api/Controller.md | 2 +- docs/core/api/useSuspense.md | 20 ++++++++++++------- packages/core/src/controller/Controller.ts | 2 ++ 6 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.agents/skills/data-client-manager/references/Controller.vue.md b/.agents/skills/data-client-manager/references/Controller.vue.md index ed2b210dc94a..d39a285a3414 100644 --- a/.agents/skills/data-client-manager/references/Controller.vue.md +++ b/.agents/skills/data-client-manager/references/Controller.vue.md @@ -580,7 +580,7 @@ export enum ExpiryStatus { ##### Invalid -- Will always suspend +- Will always suspend on setup (mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves) - Will always fetch #### expiresAt diff --git a/.agents/skills/data-client-vue/references/Controller.md b/.agents/skills/data-client-vue/references/Controller.md index 085a6a3ae926..f21364a64d19 100644 --- a/.agents/skills/data-client-vue/references/Controller.md +++ b/.agents/skills/data-client-vue/references/Controller.md @@ -580,7 +580,7 @@ export enum ExpiryStatus { ##### Invalid -- Will always suspend +- Will always suspend on setup (mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves) - Will always fetch #### expiresAt diff --git a/.agents/skills/data-client-vue/references/useSuspense.md b/.agents/skills/data-client-vue/references/useSuspense.md index 89076c4b2b68..54aa92afef35 100644 --- a/.agents/skills/data-client-vue/references/useSuspense.md +++ b/.agents/skills/data-client-vue/references/useSuspense.md @@ -94,17 +94,19 @@ export const getProfile = new Endpoint( Cache policy is [Stale-While-Revalidate](https://tools.ietf.org/html/rfc5861) by default but also [configurable](https://dataclient.io/vue/concepts/expiry-policy). -| Expiry Status | Fetch | Suspend | Error | Conditions | -| ------------- | --------------- | ------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Invalid | yes1 | yes | no | not in store, [deletion](https://dataclient.io/rest/api/resource#delete), [invalidation](./Controller.md#invalidate), [invalidIfStale](https://dataclient.io/vue/concepts/expiry-policy#endpointinvalidifstale) | -| Stale | yes1 | no | no | (first-render, arg change) & [expiry < now](https://dataclient.io/vue/concepts/expiry-policy) | -| Valid | no | no | maybe2 | fetch completion | -| | no | no | no | `null` used as second argument | +| Expiry Status | Fetch | Suspend | Error | Conditions | +| ------------- | --------------- | --------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Invalid | yes1 | yes3 | no | not in store, [deletion](https://dataclient.io/rest/api/resource#delete), [invalidation](./Controller.md#invalidate), [invalidIfStale](https://dataclient.io/vue/concepts/expiry-policy#endpointinvalidifstale) | +| Stale | yes1 | no | no | (first-render, arg change) & [expiry < now](https://dataclient.io/vue/concepts/expiry-policy) | +| Valid | no | no | maybe2 | fetch completion | +| | no | no | no | `null` used as second argument | > **Note** > > 1. Identical fetches are automatically deduplicated > 2. [Hard errors](https://dataclient.io/vue/concepts/error-policy#hard) to be [caught](./data-dependency.md#async-fallbacks) by [onErrorCaptured()](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured) +> +> 3) Only during setup. Vue can't suspend a mounted component again, so after [invalidation](./Controller.md#invalidate) it [keeps returning its current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves. > **Tip: Conditional Dependencies** > diff --git a/docs/core/api/Controller.md b/docs/core/api/Controller.md index f123340a4938..5e79758ef329 100644 --- a/docs/core/api/Controller.md +++ b/docs/core/api/Controller.md @@ -949,7 +949,7 @@ export enum ExpiryStatus { ##### Invalid -- Will always suspend +- Will always suspend:vue[ on setup (mounted components [keep their current data](../concepts/expiry-policy.md#invalidate) until the refetch resolves)] - Will always fetch #### expiresAt diff --git a/docs/core/api/useSuspense.md b/docs/core/api/useSuspense.md index 7cc9881e04d0..bd947fd65a13 100644 --- a/docs/core/api/useSuspense.md +++ b/docs/core/api/useSuspense.md @@ -204,20 +204,26 @@ render(); Cache policy is [Stale-While-Revalidate](https://tools.ietf.org/html/rfc5861) by default but also [configurable](../concepts/expiry-policy.md). -| Expiry Status | Fetch | Suspend | Error | Conditions | -| ------------- | --------------- | ------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Invalid | yes1 | yes | no | not in store, [deletion](/rest/api/resource#delete), [invalidation](./Controller.md#invalidate), [invalidIfStale](../concepts/expiry-policy.md#endpointinvalidifstale) | -| Stale | yes1 | no | no | (first-render, arg change) & [expiry < now](../concepts/expiry-policy.md) | -| Valid | no | no | maybe2 | fetch completion | -| | no | no | no | `null` used as second argument | +| Expiry Status | Fetch | Suspend | Error | Conditions | +| ------------- | --------------- | --------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Invalid | yes1 | yes:vue[3] | no | not in store, [deletion](/rest/api/resource#delete), [invalidation](./Controller.md#invalidate), [invalidIfStale](../concepts/expiry-policy.md#endpointinvalidifstale) | +| Stale | yes1 | no | no | (first-render, arg change) & [expiry < now](../concepts/expiry-policy.md) | +| Valid | no | no | maybe2 | fetch completion | +| | no | no | no | `null` used as second argument | -:::note +::::note 1. Identical fetches are automatically deduplicated 2. [Hard errors](../concepts/error-policy.md#hard) to be [caught](../getting-started/data-dependency#async-fallbacks) by :react[[Error Boundaries](./AsyncBoundary.md)]:vue[[onErrorCaptured()](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured)] +:::vue + +3. Only during setup. Vue can't suspend a mounted component again, so after [invalidation](./Controller.md#invalidate) it [keeps returning its current data](../concepts/expiry-policy.md#invalidate) until the refetch resolves. + ::: +:::: + ::::react :::info[React Native] diff --git a/packages/core/src/controller/Controller.ts b/packages/core/src/controller/Controller.ts index 6d590b70b04b..5fd6289b1670 100644 --- a/packages/core/src/controller/Controller.ts +++ b/packages/core/src/controller/Controller.ts @@ -188,6 +188,7 @@ export default class Controller< /** * Forces refetching and suspense on useSuspense with the same Endpoint and parameters. + * In Vue, mounted components keep showing their current data until the refetch resolves. * @see https://dataclient.io/docs/api/Controller#invalidate */ invalidate = ( @@ -204,6 +205,7 @@ export default class Controller< /** * Forces refetching and suspense on useSuspense on all matching endpoint result keys. + * In Vue, mounted components keep showing their current data until the refetch resolves. * @see https://dataclient.io/docs/api/Controller#invalidateAll * @returns Promise that resolves when invalidation is commited. */ From 11448e9259713751e8b4f984adf4c3361763b78b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 00:13:33 +0000 Subject: [PATCH 2/5] chore: Regenerate website editor types Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Tj5PXbDEpJbnwML9CXTHFb --- .../components/Playground/editor-types/@data-client/core.d.ts | 2 ++ .../Playground/editor-types/@data-client/core/mock.d.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/website/src/components/Playground/editor-types/@data-client/core.d.ts b/website/src/components/Playground/editor-types/@data-client/core.d.ts index a21c6d45e2e1..d56be53d7640 100644 --- a/website/src/components/Playground/editor-types/@data-client/core.d.ts +++ b/website/src/components/Playground/editor-types/@data-client/core.d.ts @@ -821,11 +821,13 @@ declare class Controller { }>(endpoint: E, ...args: readonly [...Parameters]) => E['schema'] extends undefined | null ? ReturnType | ResolveType : Promise> | Denormalize; /** * Forces refetching and suspense on useSuspense with the same Endpoint and parameters. + * In Vue, mounted components keep showing their current data until the refetch resolves. * @see https://dataclient.io/docs/api/Controller#invalidate */ invalidate: (endpoint: E, ...args: readonly [...Parameters] | readonly [null]) => Promise; /** * Forces refetching and suspense on useSuspense on all matching endpoint result keys. + * In Vue, mounted components keep showing their current data until the refetch resolves. * @see https://dataclient.io/docs/api/Controller#invalidateAll * @returns Promise that resolves when invalidation is commited. */ diff --git a/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts b/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts index 3cfcce0981f2..668222f5f2ea 100644 --- a/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts +++ b/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts @@ -711,11 +711,13 @@ declare class Controller { }>(endpoint: E, ...args: readonly [...Parameters]) => E['schema'] extends undefined | null ? ReturnType | ResolveType$1 : Promise> | Denormalize$1; /** * Forces refetching and suspense on useSuspense with the same Endpoint and parameters. + * In Vue, mounted components keep showing their current data until the refetch resolves. * @see https://dataclient.io/docs/api/Controller#invalidate */ invalidate: (endpoint: E, ...args: readonly [...Parameters] | readonly [null]) => Promise; /** * Forces refetching and suspense on useSuspense on all matching endpoint result keys. + * In Vue, mounted components keep showing their current data until the refetch resolves. * @see https://dataclient.io/docs/api/Controller#invalidateAll * @returns Promise that resolves when invalidation is commited. */ From abe724c6b8cf76c5b1417a162e5ac4042ab68779 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 00:15:48 +0000 Subject: [PATCH 3/5] docs: Tighten Vue invalidate carve-outs Fold the Vue caveat into the invalidate JSDoc's first sentence and point the footnotes at expiry-policy instead of restating the reason. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Tj5PXbDEpJbnwML9CXTHFb --- .../data-client-manager/references/Controller.vue.md | 2 +- .agents/skills/data-client-vue/references/Controller.md | 2 +- .agents/skills/data-client-vue/references/useSuspense.md | 2 +- docs/core/api/Controller.md | 2 +- docs/core/api/useSuspense.md | 2 +- packages/core/src/controller/Controller.ts | 8 ++++---- .../Playground/editor-types/@data-client/core.d.ts | 8 ++++---- .../Playground/editor-types/@data-client/core/mock.d.ts | 8 ++++---- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.agents/skills/data-client-manager/references/Controller.vue.md b/.agents/skills/data-client-manager/references/Controller.vue.md index d39a285a3414..98de5792e5e7 100644 --- a/.agents/skills/data-client-manager/references/Controller.vue.md +++ b/.agents/skills/data-client-manager/references/Controller.vue.md @@ -580,7 +580,7 @@ export enum ExpiryStatus { ##### Invalid -- Will always suspend on setup (mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves) +- Will always suspend during setup; mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves - Will always fetch #### expiresAt diff --git a/.agents/skills/data-client-vue/references/Controller.md b/.agents/skills/data-client-vue/references/Controller.md index f21364a64d19..9a152463cf1d 100644 --- a/.agents/skills/data-client-vue/references/Controller.md +++ b/.agents/skills/data-client-vue/references/Controller.md @@ -580,7 +580,7 @@ export enum ExpiryStatus { ##### Invalid -- Will always suspend on setup (mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves) +- Will always suspend during setup; mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves - Will always fetch #### expiresAt diff --git a/.agents/skills/data-client-vue/references/useSuspense.md b/.agents/skills/data-client-vue/references/useSuspense.md index 54aa92afef35..9dba0dda3b59 100644 --- a/.agents/skills/data-client-vue/references/useSuspense.md +++ b/.agents/skills/data-client-vue/references/useSuspense.md @@ -106,7 +106,7 @@ Cache policy is [Stale-While-Revalidate](https://tools.ietf.org/html/rfc5861) by > 1. Identical fetches are automatically deduplicated > 2. [Hard errors](https://dataclient.io/vue/concepts/error-policy#hard) to be [caught](./data-dependency.md#async-fallbacks) by [onErrorCaptured()](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured) > -> 3) Only during setup. Vue can't suspend a mounted component again, so after [invalidation](./Controller.md#invalidate) it [keeps returning its current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves. +> 3) Only during setup; mounted components [keep their current data](https://dataclient.io/vue/concepts/expiry-policy#invalidate) until the refetch resolves. > **Tip: Conditional Dependencies** > diff --git a/docs/core/api/Controller.md b/docs/core/api/Controller.md index 5e79758ef329..585fbdc062e6 100644 --- a/docs/core/api/Controller.md +++ b/docs/core/api/Controller.md @@ -949,7 +949,7 @@ export enum ExpiryStatus { ##### Invalid -- Will always suspend:vue[ on setup (mounted components [keep their current data](../concepts/expiry-policy.md#invalidate) until the refetch resolves)] +- Will always suspend:vue[ during setup; mounted components [keep their current data](../concepts/expiry-policy.md#invalidate) until the refetch resolves] - Will always fetch #### expiresAt diff --git a/docs/core/api/useSuspense.md b/docs/core/api/useSuspense.md index bd947fd65a13..dd9886ca41fd 100644 --- a/docs/core/api/useSuspense.md +++ b/docs/core/api/useSuspense.md @@ -218,7 +218,7 @@ Cache policy is [Stale-While-Revalidate](https://tools.ietf.org/html/rfc5861) by :::vue -3. Only during setup. Vue can't suspend a mounted component again, so after [invalidation](./Controller.md#invalidate) it [keeps returning its current data](../concepts/expiry-policy.md#invalidate) until the refetch resolves. +3. Only during setup; mounted components [keep their current data](../concepts/expiry-policy.md#invalidate) until the refetch resolves. ::: diff --git a/packages/core/src/controller/Controller.ts b/packages/core/src/controller/Controller.ts index 5fd6289b1670..5afa12a14a33 100644 --- a/packages/core/src/controller/Controller.ts +++ b/packages/core/src/controller/Controller.ts @@ -187,8 +187,8 @@ export default class Controller< }; /** - * Forces refetching and suspense on useSuspense with the same Endpoint and parameters. - * In Vue, mounted components keep showing their current data until the refetch resolves. + * Forces refetching on useSuspense with the same Endpoint and parameters, suspending until it resolves + * (mounted Vue components keep their current data instead). * @see https://dataclient.io/docs/api/Controller#invalidate */ invalidate = ( @@ -204,8 +204,8 @@ export default class Controller< : Promise.resolve(); /** - * Forces refetching and suspense on useSuspense on all matching endpoint result keys. - * In Vue, mounted components keep showing their current data until the refetch resolves. + * Forces refetching on useSuspense on all matching endpoint result keys, suspending until it resolves + * (mounted Vue components keep their current data instead). * @see https://dataclient.io/docs/api/Controller#invalidateAll * @returns Promise that resolves when invalidation is commited. */ diff --git a/website/src/components/Playground/editor-types/@data-client/core.d.ts b/website/src/components/Playground/editor-types/@data-client/core.d.ts index d56be53d7640..7452fe3bb6a3 100644 --- a/website/src/components/Playground/editor-types/@data-client/core.d.ts +++ b/website/src/components/Playground/editor-types/@data-client/core.d.ts @@ -820,14 +820,14 @@ declare class Controller { update?: EndpointUpdateFunction; }>(endpoint: E, ...args: readonly [...Parameters]) => E['schema'] extends undefined | null ? ReturnType | ResolveType : Promise> | Denormalize; /** - * Forces refetching and suspense on useSuspense with the same Endpoint and parameters. - * In Vue, mounted components keep showing their current data until the refetch resolves. + * Forces refetching on useSuspense with the same Endpoint and parameters, suspending until it resolves + * (mounted Vue components keep their current data instead). * @see https://dataclient.io/docs/api/Controller#invalidate */ invalidate: (endpoint: E, ...args: readonly [...Parameters] | readonly [null]) => Promise; /** - * Forces refetching and suspense on useSuspense on all matching endpoint result keys. - * In Vue, mounted components keep showing their current data until the refetch resolves. + * Forces refetching on useSuspense on all matching endpoint result keys, suspending until it resolves + * (mounted Vue components keep their current data instead). * @see https://dataclient.io/docs/api/Controller#invalidateAll * @returns Promise that resolves when invalidation is commited. */ diff --git a/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts b/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts index 668222f5f2ea..8309965b151c 100644 --- a/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts +++ b/website/src/components/Playground/editor-types/@data-client/core/mock.d.ts @@ -710,14 +710,14 @@ declare class Controller { update?: EndpointUpdateFunction; }>(endpoint: E, ...args: readonly [...Parameters]) => E['schema'] extends undefined | null ? ReturnType | ResolveType$1 : Promise> | Denormalize$1; /** - * Forces refetching and suspense on useSuspense with the same Endpoint and parameters. - * In Vue, mounted components keep showing their current data until the refetch resolves. + * Forces refetching on useSuspense with the same Endpoint and parameters, suspending until it resolves + * (mounted Vue components keep their current data instead). * @see https://dataclient.io/docs/api/Controller#invalidate */ invalidate: (endpoint: E, ...args: readonly [...Parameters] | readonly [null]) => Promise; /** - * Forces refetching and suspense on useSuspense on all matching endpoint result keys. - * In Vue, mounted components keep showing their current data until the refetch resolves. + * Forces refetching on useSuspense on all matching endpoint result keys, suspending until it resolves + * (mounted Vue components keep their current data instead). * @see https://dataclient.io/docs/api/Controller#invalidateAll * @returns Promise that resolves when invalidation is commited. */ From 28ec6373c045273dd8c18774e6602112f0e53a68 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 15:40:20 +0000 Subject: [PATCH 4/5] docs: Show how to re-suspend a Vue component after invalidate Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Tj5PXbDEpJbnwML9CXTHFb --- .../references/Controller.vue.md | 32 ++++++++++++++++ .../data-client-vue/references/Controller.md | 32 ++++++++++++++++ docs/core/api/Controller.md | 38 +++++++++++++++++++ 3 files changed, 102 insertions(+) diff --git a/.agents/skills/data-client-manager/references/Controller.vue.md b/.agents/skills/data-client-manager/references/Controller.vue.md index 98de5792e5e7..e81e1c378770 100644 --- a/.agents/skills/data-client-manager/references/Controller.vue.md +++ b/.agents/skills/data-client-manager/references/Controller.vue.md @@ -239,6 +239,38 @@ until the refetch resolves. ``` +> **Tip: Show the Suspense fallback again** +> +> Remount the component with a new `key` after invalidating; the new instance suspends on the invalid data. +> `timeout="0"` makes `` show its fallback while it waits instead of the old content. Remounting +> resets the component's local state. +> +> ```html title="ArticlePage.vue" +> +> +> +> ``` + > **Tip: Invalidate many endpoints at once** > > Use [schema.Invalidate](https://dataclient.io/rest/api/Invalidate) to invalidate every endpoint that contains a given entity. diff --git a/.agents/skills/data-client-vue/references/Controller.md b/.agents/skills/data-client-vue/references/Controller.md index 9a152463cf1d..75eddaacf7ed 100644 --- a/.agents/skills/data-client-vue/references/Controller.md +++ b/.agents/skills/data-client-vue/references/Controller.md @@ -239,6 +239,38 @@ until the refetch resolves. ``` +> **Tip: Show the Suspense fallback again** +> +> Remount the component with a new `key` after invalidating; the new instance suspends on the invalid data. +> `timeout="0"` makes `` show its fallback while it waits instead of the old content. Remounting +> resets the component's local state. +> +> ```html title="ArticlePage.vue" +> +> +> +> ``` + > **Tip: Invalidate many endpoints at once** > > Use [schema.Invalidate](https://dataclient.io/rest/api/Invalidate) to invalidate every endpoint that contains a given entity. diff --git a/docs/core/api/Controller.md b/docs/core/api/Controller.md index 585fbdc062e6..ce2e28c7e51b 100644 --- a/docs/core/api/Controller.md +++ b/docs/core/api/Controller.md @@ -431,6 +431,44 @@ function ArticleName({ id }: { id: string }) { ::: +::::vue + +:::tip[Show the Suspense fallback again] + +Remount the component with a new `key` after invalidating; the new instance suspends on the invalid data. +`timeout="0"` makes `` show its fallback while it waits instead of the old content. Remounting +resets the component's local state. + +```html title="ArticlePage.vue" + + + +``` + +::: + +:::: + ::::react :::tip From 2e6cab7f00c223e4be2bd1b5859c1fabeca5b2ac Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 15:43:48 +0000 Subject: [PATCH 5/5] docs: Name the Vue remount key for its purpose Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Tj5PXbDEpJbnwML9CXTHFb --- .../skills/data-client-manager/references/Controller.vue.md | 6 +++--- .agents/skills/data-client-vue/references/Controller.md | 6 +++--- docs/core/api/Controller.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.agents/skills/data-client-manager/references/Controller.vue.md b/.agents/skills/data-client-manager/references/Controller.vue.md index e81e1c378770..eb4ab5849bce 100644 --- a/.agents/skills/data-client-manager/references/Controller.vue.md +++ b/.agents/skills/data-client-manager/references/Controller.vue.md @@ -254,18 +254,18 @@ until the refetch resolves. > > const props = defineProps<{ id: string }>(); > const ctrl = useController(); -> const version = ref(0); +> const remountKey = ref(0); > > async function reload() { > await ctrl.invalidate(ArticleResource.get, { id: props.id }); -> version.value++; +> remountKey.value++; > } > > > diff --git a/.agents/skills/data-client-vue/references/Controller.md b/.agents/skills/data-client-vue/references/Controller.md index 75eddaacf7ed..5028bf0c4f40 100644 --- a/.agents/skills/data-client-vue/references/Controller.md +++ b/.agents/skills/data-client-vue/references/Controller.md @@ -254,18 +254,18 @@ until the refetch resolves. > > const props = defineProps<{ id: string }>(); > const ctrl = useController(); -> const version = ref(0); +> const remountKey = ref(0); > > async function reload() { > await ctrl.invalidate(ArticleResource.get, { id: props.id }); -> version.value++; +> remountKey.value++; > } > > > diff --git a/docs/core/api/Controller.md b/docs/core/api/Controller.md index ce2e28c7e51b..2dd593262238 100644 --- a/docs/core/api/Controller.md +++ b/docs/core/api/Controller.md @@ -448,18 +448,18 @@ resets the component's local state. const props = defineProps<{ id: string }>(); const ctrl = useController(); - const version = ref(0); + const remountKey = ref(0); async function reload() { await ctrl.invalidate(ArticleResource.get, { id: props.id }); - version.value++; + remountKey.value++; }