1 line
1.6 KiB
Plaintext
1 line
1.6 KiB
Plaintext
|
{"version":3,"file":"withExpoRoot.js","sourceRoot":"","sources":["../../src/launch/withExpoRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,qFAAqF;AACrF,iFAAiF;AACjF,IAAI,eAAe,GAA2B,GAAG,EAAE,GAAE,CAAC,CAAC;AAEvD,IAAI,OAAO,EAAE;IACX,IAAI;QACF,oCAAoC;QACpC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACpD,eAAe,GAAG,YAAY,CAAC;KAChC;IAAC,MAAM,GAAE;CACX;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAwC;IAExC,OAAO,SAAS,QAAQ,CAAC,KAAQ;QAC/B,eAAe,EAAE,CAAC;QAElB,MAAM,aAAa,GAAG;YACpB,GAAG,KAAK;YACR,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,aAAa,CAAC,cAAc,EAAE;SACnE,CAAC;QAEF,OAAO,oBAAC,gBAAgB,oBAAK,aAAa,EAAI,CAAC;IACjD,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import * as ErrorRecovery from 'expo-error-recovery';\nimport * as React from 'react';\n\nimport { InitialProps } from './withExpoRoot.types';\n\n// This hook can be optionally imported because __DEV__ never changes during runtime.\n// Using __DEV__ like this enables tree shaking to remove the hook in production.\nlet useDevKeepAwake: (tag?: string) => void = () => {};\n\nif (__DEV__) {\n try {\n // Optionally import expo-keep-awake\n const { useKeepAwake } = require('expo-keep-awake');\n useDevKeepAwake = useKeepAwake;\n } catch {}\n}\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentType<P> {\n return function ExpoRoot(props: P) {\n useDevKeepAwake();\n\n const combinedProps = {\n ...props,\n exp: { ...props.exp, errorRecovery: ErrorRecovery.recoveredProps },\n };\n\n return <AppRootComponent {...combinedProps} />;\n };\n}\n"]}
|