@applicaster/zapp-react-native-ui-components 15.0.0-rc.37 → 15.0.0-rc.39

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.
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useEffect } from "react";
2
2
  import { equals } from "ramda";
3
3
  import { Animated, ViewProps, ViewStyle } from "react-native";
4
4
  import { useSafeAreaFrame } from "react-native-safe-area-context";
@@ -95,9 +95,22 @@ function SceneComponent({
95
95
  });
96
96
 
97
97
  const frame = useSafeAreaFrame();
98
+
99
+ const [memoFrame, setMemoFrame] = React.useState(frame);
100
+
101
+ useEffect(() => {
102
+ if (isActive) {
103
+ setMemoFrame((oldFrame) =>
104
+ oldFrame.width === frame.width && oldFrame.height === frame.height
105
+ ? oldFrame
106
+ : frame
107
+ );
108
+ }
109
+ }, [isActive, frame.width, frame.height]);
110
+
98
111
  const isAnimating = animating && overlayStyle;
99
112
 
100
- const dimensions = isAnimating ? fullWidthDimensions : frame;
113
+ const dimensions = isAnimating ? fullWidthDimensions : memoFrame;
101
114
 
102
115
  return (
103
116
  <Animated.View
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "15.0.0-rc.37",
3
+ "version": "15.0.0-rc.39",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "15.0.0-rc.37",
32
- "@applicaster/zapp-react-native-bridge": "15.0.0-rc.37",
33
- "@applicaster/zapp-react-native-redux": "15.0.0-rc.37",
34
- "@applicaster/zapp-react-native-utils": "15.0.0-rc.37",
31
+ "@applicaster/applicaster-types": "15.0.0-rc.39",
32
+ "@applicaster/zapp-react-native-bridge": "15.0.0-rc.39",
33
+ "@applicaster/zapp-react-native-redux": "15.0.0-rc.39",
34
+ "@applicaster/zapp-react-native-utils": "15.0.0-rc.39",
35
35
  "promise": "^8.3.0",
36
36
  "url": "^0.11.0",
37
37
  "uuid": "^3.3.2"