Skip to content

Commit 111f327

Browse files
committed
docs: note about plugin change
1 parent 00b661d commit 111f327

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/guide/migration/v0_7.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,28 @@ export const useAuth = defineModule('auth', ({ // [!code ++]
700700
})
701701
```
702702
703+
## Plugins
704+
705+
### `model` renamed to `collection` in payload
706+
707+
<FrameworkBadges
708+
:frameworks="{
709+
vue: true,
710+
nuxt: true,
711+
}"
712+
/>
713+
714+
::: info Why this change?
715+
The term `model` has been replaced with `collection` throughout the rstore codebase and API to better reflect its purpose and avoid confusion with Vue's own `defineModel` function and `v-model` API.
716+
:::
717+
718+
```ts
719+
hook('fetchFirst', async ({ model, key, params }) => { // [!code --]
720+
hook('fetchFirst', async ({ collection, key, params }) => { // [!code ++]
721+
// ...
722+
})
723+
```
724+
703725
## Advanced APIs
704726
705727
### `$models` renamed to `$collections`

0 commit comments

Comments
 (0)