-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
56 lines (52 loc) · 1.65 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {StatusBar} from 'react-native';
import {StackParamList} from './src/types';
import {NavigationContainer} from '@react-navigation/native';
import {ExampleScreens} from './src/screens';
import {Home} from './src/Home';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import {
configureReanimatedLogger,
ReanimatedLogLevel,
} from 'react-native-reanimated';
const Stack = createNativeStackNavigator<StackParamList>();
configureReanimatedLogger({
level: ReanimatedLogLevel.warn,
strict: false, // Reanimated runs in strict mode by default
});
const App: React.FC = () => {
return (
<GestureHandlerRootView style={{flex: 1}}>
<StatusBar hidden />
<SafeAreaProvider>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Home"
key="Home"
component={Home}
options={{
title: 'Creative Animations',
}}
/>
{ExampleScreens.map(screen => (
<Stack.Screen
name={screen.name}
key={screen.name}
component={screen.component}
options={{
title: screen.title,
headerShown: false,
}}
/>
))}
</Stack.Navigator>
</NavigationContainer>
</SafeAreaProvider>
</GestureHandlerRootView>
);
};
export default App;