zuitable/App.js

57 lines
1.5 KiB
JavaScript
Raw Normal View History

2024-02-27 15:41:26 +08:00
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import { StyleSheet, ScrollView, View, Text, StatusBar } from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import Router from './router';
import { Provider } from 'mobx-react';
import Store from './src/stores/index';
import { NavigationContainer, useFocusEffect } from '@react-navigation/native';
import { createStackNavigator, HeaderBackButton } from '@react-navigation/stack';
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
console.disableYellowBox = true;
const App: () => React$Node = () => {
return (
<>
<Provider {...Store}>
<SafeAreaProvider>
<StatusBar
animated={true}
barStyle={'default'}
backgroundColor={'white'}
translucent={true}
/>
<NavigationContainer
onStateChange={state => Store.appStore.setRouterState(state)}
ref={navigatorRef => Store.appStore.setRouterRef(navigatorRef)}>
<Router />
</NavigationContainer>
</SafeAreaProvider>
</Provider>
</>
);
};
export default App;