FirebaseExtended / reactfire

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

useFirestoreDocData returns status: "success" for wrong document (same as issue #327) #601

Closed ti1024 closed 10 months ago

ti1024 commented 10 months ago

I do not know whether issue #327 was once fixed and regressed or it was never fixed, but I still see the same bug with essentially the same repro. Note that the test at https://github.com/FirebaseExtended/reactfire/blob/9429194d9dfed9a4b37129661d230ebcd0071e89/test/firestore.test.tsx#L104 only tests that the correct doc is returned evetually after the query changes.

Version info

React: 18.2.0

Firebase: 9.23.0

ReactFire: 4.2.3

Other (e.g. Node, browser, operating system) (if applicable):

Test case

Same as issue #327.

Steps to reproduce

Same as issue #327.

Expected behavior

Same as issue #327.

Actual behavior

Same as issue #327.

ti1024 commented 10 months ago

This is because #583 (the fix for #327) has not been released. I cannot reproduce the bug with the current unreleased version in Git.