-
Notifications
You must be signed in to change notification settings - Fork 408
Collections and rendering #329
-
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? Is EDIT: I assume useMemo 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 and useFirestoreXData
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1