Collections and rendering #329
Unanswered
maxkrieger
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If I use
useFirestoreCollectionData
in a top level component to render a list of many items, how over-zealous will react be about rendering? I learned about this general pitfall of high level state while watching the Recoil demo talk.Ideally, a single item component re-renders on update, but not the whole list.
Is there a way to only grab, say, the IDs of a collection and not re-render if there are doc updates to that collection? IsEDIT: I assumeuseMemo
the only way?useFirestoreCollection
is what I actually want, and the snapshot only changes when keys are added/removed. Just looking for confirmation now!Might be a good addition to the docs to note this difference between
useFirestoreX
anduseFirestoreXData
Beta Was this translation helpful? Give feedback.
All reactions