import { StrictMode } from 'react' import { ExpoRoot, type ExpoRootProps } from './ExpoRoot' import { RootErrorBoundary } from './RootErrorBoundary' import type { GlobbedRouteImports } from './types' import { useViteRoutes } from './useViteRoutes' type RootProps = Omit & { routes: GlobbedRouteImports; path?: string } // export function Root(props: RootProps) { // return ( // // ⚠️ breaks expo router! // // this made hydration mis-match despite nothing thrown? // // // // // // // ) // } export function Root({ routes, path, ...props }: RootProps) { const context = useViteRoutes(routes, globalThis['__vxrnVersion']) return ( // // ) } // if getting element type is undefined // this helped debug some hard to debug ish // // its so hard to debug ssr and we get no componentstack trace, this helps: // if (typeof window === 'undefined') { // const og = React.createElement // // @ts-ignore // React.createElement = (...args) => { // if (!args[0]) { // console.trace('Missing export, better stack trace here', !!args[0]) // } // // @ts-ignore // return og(...args) // } // const og2 = JSX.jsx // // @ts-ignore // JSX.jsx = (...args) => { // if (!args[0]) { // console.trace('Missing export, better stack trace here', !!args[0]) // } // // @ts-ignore // return og2(...args) // } // }