@applicaster/zapp-react-native-utils 15.1.9-alpha.3547421944 → 15.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "15.1.9-alpha.3547421944",
3
+ "version": "15.1.9",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "15.1.9-alpha.3547421944",
30
+ "@applicaster/applicaster-types": "15.1.9",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -117,7 +117,6 @@ export const useCellClick = ({
117
117
  }
118
118
  },
119
119
  [
120
- item,
121
120
  onCellTap,
122
121
  currentRoute,
123
122
  setEntryContext,
@@ -129,5 +128,15 @@ export const useCellClick = ({
129
128
  ]
130
129
  );
131
130
 
132
- return cellSelectable ? onPress : noop;
131
+ const onPressRef = React.useRef<onPressReturnFn>();
132
+
133
+ if (!cellSelectable) {
134
+ // update ref with dummy function
135
+ onPressRef.current = noop;
136
+ } else {
137
+ // update ref with the latest onPress function
138
+ onPressRef.current = onPress;
139
+ }
140
+
141
+ return React.useCallback(onPressRef.current, []);
133
142
  };