@applicaster/zapp-react-native-ui-components 12.0.27-alpha.2213255057 → 12.0.27-alpha.7708038842

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.
@@ -65,6 +65,7 @@ export const useLoadingState = (
65
65
 
66
66
  // Fix: Only advance index sequentially, don't jump to highest loaded component
67
67
  let newIndex = state.index;
68
+
68
69
  if (payload === state.index + 1) {
69
70
  // Only advance if this is the next sequential component
70
71
  newIndex = payload;
@@ -87,10 +88,14 @@ export const useLoadingState = (
87
88
  }
88
89
  }, []);
89
90
 
90
- const handleComponentLoaded = React.useCallback(
91
- (index) => dispatch({ payload: index }),
92
- []
93
- );
91
+ const handleComponentLoaded = React.useCallback((index) => {
92
+ // Prevent duplicate loading events - if component is already loaded, ignore
93
+ if (componentStateRef.current[index]) {
94
+ return;
95
+ }
96
+
97
+ dispatch({ payload: index });
98
+ }, []);
94
99
 
95
100
  const handleComponentLoadErrorWhenNeedToFail = React.useCallback(
96
101
  ({ error }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "12.0.27-alpha.2213255057",
3
+ "version": "12.0.27-alpha.7708038842",
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",
@@ -34,10 +34,10 @@
34
34
  "redux-mock-store": "^1.5.3"
35
35
  },
36
36
  "dependencies": {
37
- "@applicaster/applicaster-types": "12.0.27-alpha.2213255057",
38
- "@applicaster/zapp-react-native-bridge": "12.0.27-alpha.2213255057",
39
- "@applicaster/zapp-react-native-redux": "12.0.27-alpha.2213255057",
40
- "@applicaster/zapp-react-native-utils": "12.0.27-alpha.2213255057",
37
+ "@applicaster/applicaster-types": "12.0.27-alpha.7708038842",
38
+ "@applicaster/zapp-react-native-bridge": "12.0.27-alpha.7708038842",
39
+ "@applicaster/zapp-react-native-redux": "12.0.27-alpha.7708038842",
40
+ "@applicaster/zapp-react-native-utils": "12.0.27-alpha.7708038842",
41
41
  "promise": "^8.3.0",
42
42
  "react-router-native": "^5.1.2",
43
43
  "url": "^0.11.0",