Skip to content

Commit

Permalink
docs: fix ordering on null data source examples (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralacerda committed Jan 5, 2024
1 parent 52789b9 commit 1cef662
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/guide/realtime-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ On top of that, VueFire also allows `null` as a value for the data source. This

```ts
const user = useCurrentUser()
const myContactList = useCollection(() =>
const myContactList = useDatabaseList(() =>
user.value
? // Firebase will error if a null value is passed to `collection()`
collection(db, 'users', user.value.id, 'contacts')
? // Firebase will error if a null value is passed to `dbRef()`
dbRef(db, 'users', user.value.id, 'contacts')
: // this will be considered as no data source
null
)
```

```ts
const user = useCurrentUser()
const myContactList = useDatabaseList(() =>
const myContactList = useCollection(() =>
user.value
? // Firebase will error if a null value is passed to `dbRef()`
dbRef(db, 'users', user.value.id, 'contacts')
? // Firebase will error if a null value is passed to `collection()`
collection(db, 'users', user.value.id, 'contacts')
: // this will be considered as no data source
null
)
Expand Down

0 comments on commit 1cef662

Please sign in to comment.