You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the useCollectionData hook to grab some data from a collection. I see that the 2nd variable in the hook is to indicate loading. Logging this var I can see that loading is true on initial render (eg refreshing the page).
If you add/remove documents to a collection, I would expect loading to be true as it fetches and renders the new changes. However, it seems that it is always false after the initial render, even if you modify the underlying collection that useCollectionData is pointed at.
This maps and displays documents in the "entries" collection. It also displays a simple loading UI when the data is being fetched. This loading UI is not show when adding or removing docs, only on init load. Is this a bug, or expected behaviour? Is there a way I can get loading to update when the collection is refetched? Thanks.
The text was updated successfully, but these errors were encountered:
I am using the
useCollectionData
hook to grab some data from a collection. I see that the 2nd variable in the hook is to indicate loading. Logging this var I can see that loading istrue
on initial render (eg refreshing the page).If you add/remove documents to a collection, I would expect loading to be
true
as it fetches and renders the new changes. However, it seems that it is alwaysfalse
after the initial render, even if you modify the underlying collection thatuseCollectionData
is pointed at.Here's an example;
This maps and displays documents in the "entries" collection. It also displays a simple loading UI when the data is being fetched. This loading UI is not show when adding or removing docs, only on init load. Is this a bug, or expected behaviour? Is there a way I can get loading to update when the collection is refetched? Thanks.
The text was updated successfully, but these errors were encountered: