Skip to content

Commit 73bd282

Browse files
committed
docs: Document removal of isFeathersVuexInstance
1 parent e077064 commit 73bd282

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/service-module/notes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,18 @@ created () {
360360
}
361361
```
362362

363+
## No more `instance.isFeathersVuexInstance` property
364+
365+
The `isFeathersVuexInstance` property has been removed from all instances and clones. This could be a breaking change in your project if you were specfically depending on the property to check for instances. You can check if an object is an instance using `instanceof`:
366+
367+
```js
368+
// Assuming you've already registered a few plugins with Model classes.
369+
import { models } from 'feathers-vuex'
370+
const todo = new models.myApi.Todo({ description: 'test' })
371+
372+
assert(todo instanceof models.myApi.Todo) // <--- true
373+
```
374+
363375
## Better default `idField` support
364376

365377
Since records are keyed by id, `feathers-vuex` needs to know what the `idField` is for each service. In the last version, the default was `id`, and you had to specify something different. This version supports `id` and `_id` with zero configuration. You only need to set `idField` when you're using something other than `id` or `_id`.

0 commit comments

Comments
 (0)