@applicaster/zapp-react-native-ui-components 15.1.5-alpha.7597480209 → 15.1.5-rc.0
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.
|
@@ -61,46 +61,34 @@ export const GeneralContentScreen = ({
|
|
|
61
61
|
|
|
62
62
|
const useRiverActionProviderReady = () => {
|
|
63
63
|
const actionsInitialStateSetters = useRiverInitialState();
|
|
64
|
-
const waitStartedRef = React.useRef(false);
|
|
65
64
|
|
|
66
65
|
const [riverActionProvidersReady, setRiverActionProvidersReady] =
|
|
67
|
-
React.useState(
|
|
68
|
-
Array.isArray(actionsInitialStateSetters) &&
|
|
69
|
-
actionsInitialStateSetters.length === 0
|
|
70
|
-
);
|
|
66
|
+
React.useState(actionsInitialStateSetters.length === 0);
|
|
71
67
|
|
|
72
68
|
useEffect(() => {
|
|
73
|
-
if (riverActionProvidersReady
|
|
74
|
-
|
|
69
|
+
if (!riverActionProvidersReady) {
|
|
70
|
+
if (actionsInitialStateSetters.length > 0) {
|
|
71
|
+
allSettled(actionsInitialStateSetters).finally(() => {
|
|
72
|
+
log_debug(
|
|
73
|
+
"ScreenContainer: action provider ready, completed. Starting to present screen"
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
setRiverActionProvidersReady(true);
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
log_debug(
|
|
80
|
+
"ScreenContainer: no action provider to check, completed. Starting to present screen"
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
setRiverActionProvidersReady(true);
|
|
84
|
+
}
|
|
75
85
|
}
|
|
76
|
-
|
|
77
|
-
// Still waiting to capture river-init promises
|
|
78
|
-
if (actionsInitialStateSetters === undefined) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (actionsInitialStateSetters.length === 0) {
|
|
83
|
-
log_debug(
|
|
84
|
-
"ScreenContainer: no action provider to check, completed. Starting to present screen"
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
setRiverActionProvidersReady(true);
|
|
88
|
-
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
waitStartedRef.current = true;
|
|
93
|
-
|
|
94
|
-
allSettled(actionsInitialStateSetters).finally(() => {
|
|
95
|
-
log_debug(
|
|
96
|
-
"ScreenContainer: action provider ready, completed. Starting to present screen"
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
setRiverActionProvidersReady(true);
|
|
100
|
-
});
|
|
101
86
|
}, [actionsInitialStateSetters, riverActionProvidersReady]);
|
|
102
87
|
|
|
103
|
-
return
|
|
88
|
+
return React.useMemo(
|
|
89
|
+
() => riverActionProvidersReady,
|
|
90
|
+
[riverActionProvidersReady]
|
|
91
|
+
);
|
|
104
92
|
};
|
|
105
93
|
|
|
106
94
|
React.useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "15.1.5-
|
|
3
|
+
"version": "15.1.5-rc.0",
|
|
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.1.5-
|
|
32
|
-
"@applicaster/zapp-react-native-bridge": "15.1.5-
|
|
33
|
-
"@applicaster/zapp-react-native-redux": "15.1.5-
|
|
34
|
-
"@applicaster/zapp-react-native-utils": "15.1.5-
|
|
31
|
+
"@applicaster/applicaster-types": "15.1.5-rc.0",
|
|
32
|
+
"@applicaster/zapp-react-native-bridge": "15.1.5-rc.0",
|
|
33
|
+
"@applicaster/zapp-react-native-redux": "15.1.5-rc.0",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "15.1.5-rc.0",
|
|
35
35
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
36
|
"promise": "^8.3.0",
|
|
37
37
|
"url": "^0.11.0",
|