Skip to content

Commit c4ea15e

Browse files
committed
docs(reactivity): add events: true to all useProxyRegistry examples
1 parent 64c42ab commit c4ea15e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apps/docs/src/pages/guide/fundamentals/reactivity.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Wrap any registry for full template reactivity:
231231
```ts
232232
import { createRegistry, useProxyRegistry } from '@vuetify/v0'
233233

234-
const registry = createRegistry()
234+
const registry = createRegistry({ events: true })
235235
const proxy = useProxyRegistry(registry)
236236

237237
// proxy.values is now reactive
@@ -243,7 +243,7 @@ const proxy = useProxyRegistry(registry)
243243
<script setup>
244244
import { createRegistry, useProxyRegistry } from '@vuetify/v0'
245245
246-
const registry = createRegistry()
246+
const registry = createRegistry({ events: true })
247247
const proxy = useProxyRegistry(registry)
248248
249249
let count = 0
@@ -267,7 +267,7 @@ const proxy = useProxyRegistry(registry)
267267
```
268268

269269
> [!TIP]
270-
> `useProxyRegistry` automatically enables events on the underlying registry. You only pay the reactivity cost when you use the proxy.
270+
> `useProxyRegistry` requires `{ events: true }` on the registry. The proxy subscribes to these events to provide reactivity.
271271
272272
## Common Pitfalls
273273

@@ -290,7 +290,7 @@ The template renders once with the initial values. Adding items via `registry.re
290290
<script setup>
291291
import { createRegistry, useProxyRegistry } from '@vuetify/v0'
292292
293-
const registry = createRegistry()
293+
const registry = createRegistry({ events: true })
294294
const proxy = useProxyRegistry(registry)
295295
</script>
296296
@@ -456,7 +456,7 @@ When in doubt, check the composable's API reference—each documents its reactiv
456456
Yes. The proxy wraps the same underlying registry:
457457

458458
```ts
459-
const registry = createRegistry()
459+
const registry = createRegistry({ events: true })
460460
const proxy = useProxyRegistry(registry)
461461

462462
// Both access the same data
@@ -473,7 +473,7 @@ v0 composables work alongside any state management. If you're storing a registry
473473

474474
```ts
475475
// In Pinia store
476-
const registry = createRegistry()
476+
const registry = createRegistry({ events: true })
477477
const proxy = useProxyRegistry(registry)
478478

479479
// Expose proxy for reactive access

0 commit comments

Comments
 (0)