@applicaster/zapp-react-native-utils 12.0.0-rc.131 → 12.0.0-rc.132

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.
@@ -50,7 +50,7 @@ export const usePlayerControllerSetup = ({
50
50
  });
51
51
 
52
52
  setPlayerController(newPlayerController);
53
- }, [playerId, entry?.id, ref.current]);
53
+ }, [playerId, entry?.id]);
54
54
 
55
55
  React.useEffect(() => {
56
56
  if (!playerController) {
@@ -58,7 +58,7 @@ export const usePlayerControllerSetup = ({
58
58
  }
59
59
 
60
60
  if (!playerManager) {
61
- return null;
61
+ return;
62
62
  }
63
63
 
64
64
  if (playerManager.isPlayerRegistered(playerId)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "12.0.0-rc.131",
3
+ "version": "12.0.0-rc.132",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "12.0.0-rc.131",
31
+ "@applicaster/applicaster-types": "12.0.0-rc.132",
32
32
  "buffer": "^5.2.1",
33
33
  "camelize": "^1.0.0",
34
34
  "create-react-context": "^0.2.3",
@@ -60,13 +60,13 @@ const wrapper = ({ children }) => (
60
60
  describe("useCellClick", () => {
61
61
  it("returns a function", () => {
62
62
  const { result } = renderHook(() => useCellClick(mockProps));
63
- expect(typeof result.current.current).toBe("function");
63
+ expect(typeof result.current).toBe("function");
64
64
  cleanup();
65
65
  });
66
66
 
67
67
  it("runs default logic", () => {
68
68
  const { result } = renderHook(() => useCellClick(mockProps));
69
- const useCellClickHook = result.current.current;
69
+ const useCellClickHook = result.current;
70
70
 
71
71
  useCellClickHook();
72
72
 
@@ -76,7 +76,7 @@ describe("useCellClick", () => {
76
76
 
77
77
  it("runs onCellTap", async () => {
78
78
  const { result } = renderHook(() => useCellClick(mockProps), { wrapper });
79
- const useCellClickHook = result.current.current;
79
+ const useCellClickHook = result.current;
80
80
 
81
81
  useCellClickHook();
82
82
 
@@ -38,7 +38,7 @@ export const useCellClick = ({
38
38
  component,
39
39
  zappPipesData,
40
40
  item,
41
- }: Props): React.MutableRefObject<onPressReturnFn> => {
41
+ }: Props): onPressReturnFn => {
42
42
  const { push, currentRoute } = useNavigation();
43
43
  const { pathname } = useRoute();
44
44
 
@@ -124,5 +124,5 @@ export const useCellClick = ({
124
124
  onPressRef.current = onPress;
125
125
  }
126
126
 
127
- return onPressRef;
127
+ return React.useCallback(onPressRef.current, []);
128
128
  };