Skip to content

Commit fa8d9d1

Browse files
committed
docs: updates
1 parent 35a7f1f commit fa8d9d1

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

docs/guide/app-check.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AppCheck
2+
3+
wip

docs/guide/getting-started.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Note that we will refer to `database` and `firestore` as `db` in examples where
6969

7070
### Setup
7171

72-
First, install the VueFire Vue plugin. It will allow you to add extra modules like [Storage](./storage.md) or [Auth](./auth.md) to your app.
72+
First, install the VueFire Vue plugin. It will allow you to add extra modules like [AppCheck](./app-check.md) or [Auth](./auth.md) to your app.
7373

7474
```ts
7575
import { createApp } from 'vue'
@@ -196,29 +196,37 @@ If you want to change the data, you should use the Firebase API (e.g. `setDoc()`
196196

197197
### Options API
198198

199-
The composition API is the recommended way to use VueFire because its API is more flexible and it's easier to use with TypeScript.
200-
201199
VueFire can also be used with the Options API, while less flexible, it's still a valid way to use VueFire. First, you need to install the options plugin:
202200

203-
- Install `firestorePlugin` to use _Firestore_
204-
- Install `databasePlugin` to use Firebase _Database_
201+
- Add the `VueFireFirestoreOptionsAPI` module to use _Firestore_
202+
- Add the `VueFireDatabaseOptionsAPI` module to use Firebase _Database_
205203

206204
<FirebaseExample>
207205

208206
```js
209207
import { createApp } from 'vue'
210-
import { databasePlugin } from 'vuefire'
208+
import { VueFire, VueFireDatabaseOptionsAPI } from 'vuefire'
211209

212210
const app = createApp(App)
213-
app.use(databasePlugin)
211+
app.use(VueFire, {
212+
// ...
213+
modules: [
214+
VueFireDatabaseOptionsAPI(),
215+
],
216+
})
214217
```
215218

216219
```js
217220
import { createApp } from 'vue'
218-
import { firestorePlugin } from 'vuefire'
221+
import { VueFire, VueFireFirestoreOptionsAPI } from 'vuefire'
219222

220223
const app = createApp(App)
221-
app.use(firestorePlugin)
224+
app.use(VueFire, {
225+
// ...
226+
modules: [
227+
VueFireFirestoreOptionsAPI(),
228+
],
229+
})
222230
```
223231

224232
</FirebaseExample>

docs/guide/realtime-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ If you are looking for the VueFire Options API guide, make sure to **also check*
66

77
In VueFire, subscriptions to data changes are handled transparently. That's why we always talk about _binding_: you only provide the _data source_ (Collection, Query or Document), and VueFire takes care of the rest!
88

9-
When using Firebase Database and Firestore, you can either retrieve the data once or _subscribe_ to changes with methods like `onSnapshot()` and `onValue()`. VueFire will automatically handle the subscription for you, and update the data when it changes by internally using these functions, greatly simplifying the whole process of connecting your Vue Data to the realtime data from Firebase. It exposes a few [composables](https://vuejs.org/guide/reusability/composables.html#composables) to create these realtime bindings, it's important to note that, like other composables, these functions are meant to be used within a `setup()` function or a `<script setup>`. You can still use them outside of these contexts for advanced scenarios [like Vuex/Pinia](../cookbook/subscriptions-external.md) or global bindings but we will focus on the most common use case here. You can also use the [Options API equivalent](#options-api), in this section of the docs we will focus on the Composition API version and give you the equivalent for the Options API.
9+
When using Firebase Database and Firestore, you can either retrieve the data once or _subscribe_ to changes with methods like `onSnapshot()` and `onValue()`. VueFire will automatically handle the subscription for you, and update the data when it changes by internally using these functions, greatly simplifying the whole process of connecting your Vue Data to the realtime data from Firebase. It exposes a few [composables](https://vuejs.org/guide/reusability/composables.html#composables) to create these realtime bindings, it's important to note that, like other composables, these functions are meant to be used within a `setup()` function or a `<script setup>`. You can still use them outside of these contexts for advanced scenarios [like Vuex/Pinia](../cookbook/subscriptions-external.md) or global bindings but we will focus on the most common use case here. You can also use the [Options API equivalent](./options-api-realtime-data.md), in this section of the docs we will focus on the Composition API version and give you the equivalent for the Options API.
1010

1111
## Declarative realtime data
1212

13-
Use the `useCollection()`, `useDatabaseList()`, `useDocument()`, and `useDatabaseObject()` composables to create a realtime data connected to Firestore and/or a Realtime Database. These functions take a reference to a Collection, Query, or Document a Vue `ref()`:
13+
Use the `useCollection()`, `useDatabaseList()`, `useDocument()`, and `useDatabaseObject()` composables to create a realtime data connected to Firestore and/or a Realtime Database. These functions take a source reference to a Collection, Query, or Document. They also accept reactive versions of these as `ref()` or `computed()`:
1414

1515
<FirebaseExample>
1616

0 commit comments

Comments
 (0)