import * as React from 'react'; import { LogBoxLog } from '../src/Data/LogBoxLog'; import { parseLogBoxException } from '../src/Data/parseLogBoxLog'; import LogBoxPolyfillDOM from '../src/logbox-dom-polyfill'; import { View, Text } from 'react-native'; const logs: LogBoxLog[] = [ new LogBoxLog(parseLogBoxException({ message: "Test error", originalMessage: undefined, name: undefined, componentStack: undefined, id: -1, isComponentError: false, isFatal: false, stack: [], })), ]; /** * Empty App skeleton used as a workaround to prebuilt the Expo LogBox DOM Component. * (DOM Components are build during `expo export:embed`) * * Also used for the DOM Component UI preview via `yarn start`. */ export default function App() { const [showSandboxWarning, setSandboxWarningVisibility] = React.useState(true); return ( <> { showSandboxWarning && This is @expo/log-box development sandbox. setSandboxWarningVisibility(false)}>Close } { throw new Error("`onDismiss` placeholder, should never be called."); }} onChangeSelectedIndex={() => { throw new Error("`onChangeSelectedIndex` placeholder, should never be called."); }} // Environment polyfill props platform={process.env.EXPO_OS} devServerUrl={undefined} // Common actions props fetchTextAsync={() => Promise.reject(new Error('`fetchTextAsync` placeholder, should never be called.'))} // LogBox UI actions props onMinimize={() => { throw new Error("`onMinimize` placeholder, should never be called."); }} onReload={() => { throw new Error('`onReload` placeholder, should never be called.'); }} onCopyText={() => { throw new Error('`onCopyText` placeholder, should never be called.'); }} // DOM props dom={{}} /> ); }