|
| 1 | +--- |
| 2 | +title: What's New in 3.0 |
| 3 | +sidebarDepth: 3 |
| 4 | +--- |
| 5 | + |
| 6 | +# What's new in Feathers-Vuex 3.0 |
| 7 | + |
| 8 | +## Vue Composition API Support |
| 9 | + |
| 10 | +Version 3.0 of Feathers-Vuex is the Vue Composition API release! There were quite a few disappointed (and misinformed:) developers in 2019 when the Vue.js team announced what is now called the Vue Composition API. From my perspective: |
| 11 | + |
| 12 | +- It is the most powerful feature added to Vue since its first release. |
| 13 | +- It improves the ability to create dynamic functionality in components. |
| 14 | +- It greatly enhances organization of code in components. |
| 15 | +- It encourages code re-use. Check out the [vue-use-web](https://logaretm.github.io/vue-use-web/) collection for some great examples. |
| 16 | + |
| 17 | +And now it has become the best way to perform queries with Feathers-Vuex. To find out how to take advantage of the new functionality in your apps, read the [Feather-Vuex Composition API docs](./composition-api.md). |
| 18 | + |
| 19 | +## A Single Breaking Change |
| 20 | + |
| 21 | +Since Feathers-Vuex follows semantic versioning, a single, small breaking change is the reason for the major version bump. Feathers-Vuex 3.0 has only one breaking change: |
| 22 | + |
| 23 | +The `makeFindMixin` (and the new `useFind` utility) now have server-side pagination support turned off, by default. Real-time arrays of results are now the default setting. This really improves the development experience, especially for new users. |
| 24 | + |
| 25 | +To migrate your app to version 3.0, you need to update any `params` where you are using server-side pagination. It will work as it has been in version 2.0 once you explicitly set `paginate: true` in the params, like this: |
| 26 | + |
| 27 | +```js |
| 28 | +import { makeFindMixin } from 'feathers-vuex' |
| 29 | + |
| 30 | +export default { |
| 31 | + name: 'MyComponent', |
| 32 | + mixins: [ makeFindMixin({ service: 'users', watch: true })], |
| 33 | + computed: { |
| 34 | + usersParams() { |
| 35 | + return { |
| 36 | + query: {}, |
| 37 | + paginate: true // explicitly enable pagination, now. |
| 38 | + } |
| 39 | + } |
| 40 | + } |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +That's the only breaking change in this release. This behavior exactly matches the new `useFind` utility. |
| 45 | + |
| 46 | +## One Deprecation |
| 47 | + |
| 48 | +The `keepCopiesInStore` option is now deprecated. This was a part of the "clone and commit" API which basically disabled the reason for creating the "clone and commit" API in the first place. |
| 49 | + |
| 50 | +If you're not familiar with the Feathers-Vuex "clone and commit" API, you can learn more about the [built-in data modeling](./model-classes.md) API and the section about [Working with Forms](./feathers-vuex-form-wrapper.md#the-clone-and-commit-pattern). |
| 51 | + |
| 52 | +The `keepCopiesInStore` feature is set to be removed in Feathers-Vuex 4.0. |
0 commit comments