-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useDocument and useCollection in the same component causes useCollection to return an empty array #105
Comments
Note: I actually use a filter on the collection query, so there is a valid usecase for this. I have just made the simplest way to reproduce the issue. |
|
I don't think this is the solution. I shouldn't be forced to listen to changes. |
I am suffering from the same phenomenon. If I revalidate it after some time, it goes away, but it seems to need about 5 seconds to go by. |
I have started a complete rewrite of this library as it is no longer maintained and there are many bugs. If you are interested it's here: https://github.com/rolznz/swr-firestore (Note that the syntax is different in order to make use of the latest version of firebase) |
@rolznz |
This causes the collection to return an empty array
Result:
document {id: 'abc'…}, collection []
However, the following seems to work fine (just swapping around the calls)
Result:
document {id: 'abc'…}, collection (8) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
The text was updated successfully, but these errors were encountered: