@fto-consult/expo-ui 6.35.1 → 6.35.2
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/index.js +5 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -5,8 +5,9 @@ const REGISTER_EVENT = "REGISTER-APP-COMPONENT-ROOT";
|
|
5
5
|
import {useState,useEffect} from "react";
|
6
6
|
const propsRef = {current:null};
|
7
7
|
import APP from "$capp/instance";
|
8
|
-
import {isObj} from "$cutils";
|
9
|
-
|
8
|
+
import {isObj,uniqid} from "$cutils";
|
9
|
+
import {View} from "react-native";
|
10
|
+
const isLOCALDEV = uniqid("is-expo-ui-local-DEV...");
|
10
11
|
|
11
12
|
/****
|
12
13
|
* les options sont de la forme :
|
@@ -37,7 +38,7 @@ const MainAppEntry = function(mProps){
|
|
37
38
|
},[]);
|
38
39
|
const cProps = isObj(props) ? props : propsRef.current;
|
39
40
|
if(!isObj(cProps)) {
|
40
|
-
return
|
41
|
+
return <View/>;
|
41
42
|
}
|
42
43
|
const {onMount,onUnmount,onRender,render,swrConfig,init,...rest} = {...mProps,...cProps};
|
43
44
|
return <Provider {...rest} swrConfig={isObj(swrConfig) && swrConfig || {}} children={<App init={init} render={render} onMount={onMount} onUnmount={onUnmount} onRender={onRender}/>}/>
|
@@ -52,6 +53,7 @@ registerRootComponent(MainAppEntry);
|
|
52
53
|
|
53
54
|
//si après 5 secondes, l'application n'a pas été registrer, alors il s'agit d'un test en mode local
|
54
55
|
registerApp({
|
56
|
+
isLOCALDEV,
|
55
57
|
navigation : {
|
56
58
|
screens : require("./src/test-screens").default
|
57
59
|
},
|