What this thread does
Do first: run npm ls vue pinia --depth=0, then move each shared value to one parent or store and replace synchronized child copies with explicit update requests (npm).
Short answer
As of November 2026, this card targets Vue.js 3.5.45, with its November 5, 2026 changelog, and existing Pinia 4.1.0, October 14, 2026 stores. One owner initializes and commits the state; children read it and request updates. Disposable local drafts remain local until Save.
Choose / don't choose
- Common parent: choose for sibling consumers whose state lifetime matches that feature; don't promote a Cancel-able draft into global state (state management).
- Feature provider: choose to avoid prop drilling within one subtree; don't mutate provided state from arbitrary descendants. Provide readonly state and owner update functions (provide/inject).
- Pinia: choose for shared domain state spanning routes or app lifetime; don't duplicate it into route-local copies. Keep the existing store ID and expose domain actions; action-only writes are an application convention. Setup stores return every state property (store guide).
Not for: Nuxt SSR request state; see nuxt-state-shared-between-visitors-on-ssr-usestate-not-ref-outside-setup.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
defineProps | Declare parent input explicitly, e.g. propC: { type: String, required: true }; do not mutate it | Current Vue docs, November 2026 | props |
defineEmits | ['update:modelValue'] for default v-model; named title uses update:title | Current Vue docs, November 2026 | model contract, events |
defineModel / required | { required: true } when the parent must bind the value | Current Vue docs, November 2026 | model |
defineModel / default | A default can cause a de-synchronization between parent and child components; initialize the parent instead | Current Vue docs, November 2026 | desynchronization warning |
readonly(state) | Provide readonly state plus the owner's mutation function | Current Vue docs, November 2026 | provide/inject |
onWatcherCleanup | Register cancellation synchronously before await; abort stale request | Current Vue docs, November 2026 | watchers |
Use either the explicit props/emits pair or defineModel for the same binding, rather than declaring duplicate contracts. A child default with an undefined parent can still create different values.
Order of operations
1. Inventory all writes: ref(props.value) seeds a copy disconnected from future props. Keep a computed transformation for derived state, or a deliberately isolated edit draft (props). 2. Initialize the owner before rendering dependent children, then pass its value down. Child events update that owner once; remove watcher loops that echo the resulting prop back into the same write path. 3. Start async loading through the owner. Register abort cleanup before awaiting. Application guard: capture a load generation and edit revision; apply the response only if both still match. Every user edit advances the revision, so a late response cannot overwrite a newer edit. Cancellation handles invalidated requests, while the revision comparison handles a response that already completed (stale requests). 4. Exercise edits from each sibling, parent reset, route navigation and a delayed response arriving after an edit. Both views must reflect the single committed value; two feature instances should remain independent unless intentionally store-backed. Define reload persistence separately.
Known failures and fixes
| Error (short quote or symptom) | Cause | Fix | Source |
|---|---|---|---|
| Sibling values differ | Prop snapshot is disconnected from future prop updates | Read parent state; initialize parent; emit one update request | props, model |
Maximum recursive updates exceeded | A reactive effect is mutating its own dependencies | Trace prop, watcher and store writes; normalize before emitting and remove reciprocal synchronization | scheduler, watch-loop report |
reactivity is not triggered | Mutating a shallowRef object using $patch doesn't trigger reactivity | Use the object-patch correction in the linked release; for function-form patch replace the shallow ref's value deliberately | nguyenalter, December 19, 2024, Pinia changelog |
Nguyenalter's report and posva's reply distinguish object-patch handling from caller responsibility with function syntax. Do not create another owner to compensate. For destructuring-specific loss of reactivity, see vue-reactive-destructuring-loses-reactivity-toref-torefs-ref.
Missing
- Conflict resolution between intentional server refreshes and local unsaved edits is application policy. The load-generation/revision guard above is a derived integration pattern, not a Vue option or automatic merge.
Checked
2026-11-12; Vue/Pinia releases, component/state/watch/provider references, store guide, npm reference, scheduler and linked reports read. No application commands executed.
Started from a post by @Vue.js, packaged by the editor. Original post