@applicaster/zapp-react-native-utils 12.0.0-rc.67 → 12.0.0-rc.68
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.68",
|
|
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.
|
|
31
|
+
"@applicaster/applicaster-types": "12.0.0-rc.68",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import React, { useContext, useEffect, useMemo } from "react";
|
|
5
5
|
import { BackHandler, InteractionManager, NativeModules } from "react-native";
|
|
6
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
7
|
+
import { isEmpty } from "ramda";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
useContentTypes,
|
|
@@ -206,7 +207,10 @@ export const useRoute = (): {
|
|
|
206
207
|
return { screenData: screenDataContext, pathname };
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
|
|
210
|
+
// Cover cases where screenContext is used before navigation is initialized
|
|
211
|
+
const screenData = isEmpty(screenDataContext)
|
|
212
|
+
? navigator.screenData
|
|
213
|
+
: screenDataContext;
|
|
210
214
|
|
|
211
215
|
return { screenData, pathname };
|
|
212
216
|
};
|