Files
RecipesCam/index.ts

22 lines
712 B
TypeScript

import { registerRootComponent } from 'expo';
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import App from './App';
// SafeAreaProvider: root overlays (TopBar / CameraControls) read insets so the
// fullscreen viewfinder can run edge-to-edge under the system bars.
// (index.ts is plain TS — no JSX here.)
function Root() {
return React.createElement(
SafeAreaProvider,
null,
React.createElement(App)
);
}
// registerRootComponent calls AppRegistry.registerComponent('main', () => Root);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(Root);