react-native-onyx 1.0.46 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Onyx.js CHANGED
@@ -364,7 +364,7 @@ function keysChanged(collectionKey, partialCollection) {
364
364
  // returned by the selector.
365
365
  if (subscriber.selector) {
366
366
  subscriber.withOnyxInstance.setState((prevState) => {
367
- const previousData = reduceCollectionWithSelector(prevState[subscriber.statePropertyName], subscriber.selector, subscriber.withOnyxInstance.state);
367
+ const previousData = prevState[subscriber.statePropertyName];
368
368
  const newData = reduceCollectionWithSelector(cachedCollection, subscriber.selector, subscriber.withOnyxInstance.state);
369
369
 
370
370
  if (!deepEqual(previousData, newData)) {
@@ -494,7 +494,7 @@ function keyChanged(key, data, canUpdateSubscriber) {
494
494
  };
495
495
  const prevDataWithNewData = {
496
496
  ...prevData,
497
- [key]: getSubsetOfData(data, subscriber.selector, subscriber.withOnyxInstance.state),
497
+ ...newData,
498
498
  };
499
499
  if (!deepEqual(prevData, prevDataWithNewData)) {
500
500
  PerformanceUtils.logSetStateCall(subscriber, prevData, newData, 'keyChanged', key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",