@fto-consult/expo-ui 6.20.19 → 6.20.20
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 +3 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { registerRootComponent } from "expo";
|
|
2
2
|
import {Platform,AppRegistry } from 'react-native';
|
|
3
|
-
import apConfig from '$capp/config';
|
|
4
3
|
import App from "./src/App";
|
|
5
4
|
import Provider from "$econtext/Provider";
|
|
6
5
|
const isWeb = Platform.OS === "web";
|
|
@@ -18,13 +17,10 @@ const isWeb = Platform.OS === "web";
|
|
|
18
17
|
* }
|
|
19
18
|
*/
|
|
20
19
|
export default function registerApp ({onMount,onUnmount,onRender,render,swrConfig,init,...rest}){
|
|
21
|
-
|
|
22
|
-
return AppRegistry.registerComponent('main',()=>{
|
|
23
|
-
return <Provider {...rest} swrConfig={isObj(swrConfig) && swrConfig || {}} children={<App init={init} render={render} onMount={onMount} onUnmount={onUnmount} onRender={onRender}/>}/>
|
|
24
|
-
});
|
|
25
|
-
return registerRootComponent(function(props){
|
|
20
|
+
const component = function(props){
|
|
26
21
|
return <Provider {...props} {...rest} swrConfig={isObj(swrConfig) && swrConfig || {}} children={<App init={init} render={render} onMount={onMount} onUnmount={onUnmount} onRender={onRender}/>}/>
|
|
27
|
-
}
|
|
22
|
+
};
|
|
23
|
+
return isWeb ? registerRootComponent(component) : AppRegistry.registerComponent('main',() => component);
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
///fix bug lié au fait que l'application stuck on splashscreen en environnement mobile
|