import type { AppConstructor } from './types' ; import { AppRegistry } from 'react-native' ; import { StaticImplements } from '../utils' ; import { FSAppBase } from './app.base' ; export { APP_CONFIG_TOKEN , APP_VERSION_TOKEN , API_TOKEN } from './app.base' ; @ StaticImplements < AppConstructor > ( ) export class FSAppBeta extends FSAppBase { private root : Element | null = ( typeof this . config . root === 'string' ? document . querySelector ( this . config . root ) : this . config . root ) ?? document . getElementById ( 'root' ) ; public async startApplication ( ) { AppRegistry . runApplication ( 'Flagship' , { rootTag : this . root , hydrate : this . config . hydrate , initialProps : { } } ) ; } public async stopApplication ( ) { if ( this . root ) { AppRegistry . unmountApplicationComponentAtRootTag ( ( this . root as unknown ) as number ) ; } } }