react-native-onyx 1.0.27 → 1.0.29

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
@@ -523,7 +523,7 @@ function keyChanged(key, data, canUpdateSubscriber) {
523
523
  // returned by the selector and only if the selected data has changed.
524
524
  if (subscriber.selector) {
525
525
  subscriber.withOnyxInstance.setState((prevState) => {
526
- const previousValue = getSubsetOfData(prevState, subscriber.selector);
526
+ const previousValue = getSubsetOfData(prevState[subscriber.statePropertyName], subscriber.selector);
527
527
  const newValue = getSubsetOfData(data, subscriber.selector);
528
528
  if (!deepEqual(previousValue, newValue)) {
529
529
  return {
@@ -1,6 +1,6 @@
1
1
  // For web-only implementations of Onyx, this module will just be a no-op
2
2
 
3
- function decorateWithMetrics() {}
3
+ function decorateWithMetrics(func) { return func; }
4
4
  function getMetrics() {}
5
5
  function printMetrics() {}
6
6
  function resetMetrics() {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",