reactfire
reactfire copied to clipboard
`useFirestoreDoc` and `useFirestoreDocData` does not accept `DocumentReference`
Version info
React: 17.0.2
Firebase: 9.8.4
ReactFire: 4.2.1
Other (e.g. Node, browser, operating system) (if applicable):
Test case
- https://codesandbox.io/s/peaceful-kate-7rcucl
- run yarn build
This outputs the following:
FirebaseError: Expected type 'Query', but it was: a custom DocumentReference object
Steps to reproduce
- Install latest firebase and reactfire
- Create any
DocumentReference - use
useFirestoreDocwith the DocumentRef
Expected behavior
useFirestoreDoc should accept DocumentReference
Actual behavior
useFirestoreDoc thinks that it requires a CollectionReference or Query