Skip to content

Commit 1cef662

Browse files
authored
docs: fix ordering on null data source examples (#1483)
1 parent 52789b9 commit 1cef662

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: docs/guide/realtime-data.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,21 @@ On top of that, VueFire also allows `null` as a value for the data source. This
101101

102102
```ts
103103
const user = useCurrentUser()
104-
const myContactList = useCollection(() =>
104+
const myContactList = useDatabaseList(() =>
105105
user.value
106-
? // Firebase will error if a null value is passed to `collection()`
107-
collection(db, 'users', user.value.id, 'contacts')
106+
? // Firebase will error if a null value is passed to `dbRef()`
107+
dbRef(db, 'users', user.value.id, 'contacts')
108108
: // this will be considered as no data source
109109
null
110110
)
111111
```
112112

113113
```ts
114114
const user = useCurrentUser()
115-
const myContactList = useDatabaseList(() =>
115+
const myContactList = useCollection(() =>
116116
user.value
117-
? // Firebase will error if a null value is passed to `dbRef()`
118-
dbRef(db, 'users', user.value.id, 'contacts')
117+
? // Firebase will error if a null value is passed to `collection()`
118+
collection(db, 'users', user.value.id, 'contacts')
119119
: // this will be considered as no data source
120120
null
121121
)

0 commit comments

Comments
 (0)