Skip to content

Commit 2217ee0

Browse files
committed
Update docs
1 parent 456a19f commit 2217ee0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,11 @@ This will fire the callback once per member key depending on how many collection
266266
Onyx.connect({
267267
key: ONYXKEYS.COLLECTION.REPORT,
268268
waitForCollectionCallback: true,
269-
callback: (allReports, collectionKey, sourceValue) => {...},
269+
callback: (allReports, collectionKey) => {...},
270270
});
271271
```
272272

273-
This final option forces `Onyx.connect()` to behave more like `useOnyx()` and only update the callback once with the entire collection initially and later with an updated version of the collection when individual keys update. The `sourceValue` parameter contains only the specific keys and values that triggered the current update, which can be useful for optimizing your code to only process what changed. This parameter is not available when `waitForCollectionCallback` is false or the key is not a collection key.
273+
This final option forces `Onyx.connect()` to behave more like `useOnyx()` and only update the callback once with the entire collection initially and later with an updated version of the collection when individual keys update.
274274

275275
### Performance Considerations When Using Collections
276276

0 commit comments

Comments
 (0)