Skip to content

Commit c94ee3d

Browse files
committed
docs: some updates
1 parent d1d2b5a commit c94ee3d

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

docs/cookbook/migration-v2-v3.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
# Upgrading to VueFire v3
22

3-
VueFire v2 and VueFire v3 have a lot in common but a big improvement to the Vue.js Ecosystem happened between them: the Composition API. On top of that, Firebase SDK itself evolved a lot. VueFire v3 is built on top of the Composition API to provide an idiomatic way to use Firebase with Vue.js that works with **both Vue 2 and Vue 3**. This means that if you are still on Vue 2, as long as you are **using Vue 2.7**, you can upgrade to VueFire v3 and use the Composition API or the Options API. It also relies on the new Firebase SDK v9 which provides a modular API that greatly improves the final size of your application. Therefore, these are the requirements to upgrade to VueFire v3:
3+
VueFire v2 and VueFire v3 have a lot in common but a big improvement to the Vue.js Ecosystem happened between them: the Composition API. On top of that, Firebase SDK itself evolved a lot. VueFire v3 is built on top of the Composition API to provide an idiomatic way to use Firebase with Vue.js that works with **both Vue 2 and Vue 3**. This means that if you are still on Vue 2, as long as you are **using Vue 2.7**, you can upgrade to VueFire v3 and use the Composition API or the Options API. It also relies on the new Firebase SDK v9 which provides a modular API that greatly improves the final size of your application.
4+
5+
Therefore, these are the requirements to upgrade to VueFire v3:
46

57
- Use Vue 2.7 or higher
68
- Use Firebase SDK v9 or higher
79

10+
## General recommendations
11+
12+
VueFire 3 introduces a Composition API that is more flexible and powerful than the Options API. It keeps the existing Options API as a wrapper around the Composition API but we recommend you to give the Composition API a try as it gives you more control over your data state.
13+
14+
## Breaking changes
15+
16+
### Removal of `serialize` option for Firestore
17+
18+
Firestore support a native equivalent of the `serialize` option: [Firestore Data Converter](https://firebase.google.com/docs/firestore/query-data/get-data#custom_objects). You can use it to convert your data to a class instance. This is the recommended way to use Firestore with VueFire **and make it typesafe**.
19+
820
## Vuexfire
21+
22+
:::tip
23+
If you are using [Pinia](https://pinia.vuejs.org/), make sure to check the [Pinia guide](./subscriptions-external.md#pinia) instead.
24+
:::
25+
26+
As of VueFire 3, Vuexfire doesn't have an exact replacement. This is because the Composition API allows us to have the same functionality without the need for a plugin.
27+
28+
TODO: example

docs/guide/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm install vuefire@next firebase
1414

1515
:::warning
1616

17-
- VueFire requires Firebase JS SDK >= 9 but **is compatible with Vue 2 and Vue 3**. It's currently in alpha, make sure to check [the Roadmap](https://github.com/vuejs/vuefire/issues/1241) and report any issue you find.
17+
VueFire requires Firebase JS SDK >= 9 but **is compatible with Vue 2 and Vue 3**. It's currently in alpha, make sure to check [the Roadmap](https://github.com/vuejs/vuefire/issues/1241) and report any issue you find.
1818

1919
:::
2020

0 commit comments

Comments
 (0)