@applicaster/zapp-react-native-ui-components 15.1.4-alpha.7394150354 → 15.1.4-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,45 +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
|
-
setRiverActionProvidersReady(true);
|
|
87
|
-
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
waitStartedRef.current = true;
|
|
92
|
-
|
|
93
|
-
allSettled(actionsInitialStateSetters).finally(() => {
|
|
94
|
-
log_debug(
|
|
95
|
-
"ScreenContainer: action provider ready, completed. Starting to present screen"
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
setRiverActionProvidersReady(true);
|
|
99
|
-
});
|
|
100
86
|
}, [actionsInitialStateSetters, riverActionProvidersReady]);
|
|
101
87
|
|
|
102
|
-
return
|
|
88
|
+
return React.useMemo(
|
|
89
|
+
() => riverActionProvidersReady,
|
|
90
|
+
[riverActionProvidersReady]
|
|
91
|
+
);
|
|
103
92
|
};
|
|
104
93
|
|
|
105
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.4-
|
|
3
|
+
"version": "15.1.4-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.4-
|
|
32
|
-
"@applicaster/zapp-react-native-bridge": "15.1.4-
|
|
33
|
-
"@applicaster/zapp-react-native-redux": "15.1.4-
|
|
34
|
-
"@applicaster/zapp-react-native-utils": "15.1.4-
|
|
31
|
+
"@applicaster/applicaster-types": "15.1.4-rc.0",
|
|
32
|
+
"@applicaster/zapp-react-native-bridge": "15.1.4-rc.0",
|
|
33
|
+
"@applicaster/zapp-react-native-redux": "15.1.4-rc.0",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "15.1.4-rc.0",
|
|
35
35
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
36
|
"promise": "^8.3.0",
|
|
37
37
|
"url": "^0.11.0",
|