reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

`useFirestoreDoc` and `useFirestoreDocData` does not accept `DocumentReference`

Open Manokii opened this issue 3 years ago • 0 comments

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

  1. https://codesandbox.io/s/peaceful-kate-7rcucl
  2. run yarn build

This outputs the following: FirebaseError: Expected type 'Query', but it was: a custom DocumentReference object

Steps to reproduce

  1. Install latest firebase and reactfire
  2. Create any DocumentReference
  3. use useFirestoreDoc with the DocumentRef

Expected behavior

useFirestoreDoc should accept DocumentReference

Actual behavior

useFirestoreDoc thinks that it requires a CollectionReference or Query

Manokii avatar Jul 02 '22 22:07 Manokii