FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.
https://firebaseopensource.com/projects/firebaseextended/reactfire/
MIT License
3.51k stars 399 forks source link

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

Closed Manokii closed 1 year ago

Manokii commented 2 years ago

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

habibKadiri commented 1 year ago

I've got this issue as well, any updates?