-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
31 lines (27 loc) · 1.01 KB
/
App.js
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
import React, { useEffect } from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { navigationRef } from './src/utils/navigation'
import FirstScreen from './src/components/FirstScreen'
import SecondScreen from './src/components/SecondScreen'
import { useDispatch } from 'react-redux'
import { ApiGetDataList } from './src/api/query'
const Stack = createNativeStackNavigator()
export default function App() {
const dispatch = useDispatch()
useEffect(() => {
dispatch(ApiGetDataList())
})
return (
<NavigationContainer ref={navigationRef}>
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="First" component={FirstScreen} options={{ animation: 'slide_from_right' }} />
<Stack.Screen name="Second" component={SecondScreen} options={{ animation: 'slide_from_right' }} />
</Stack.Navigator>
</NavigationContainer>
)
}