Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
Latest commit
47 lines (36 loc) · 880 Bytes
/
Copy pathApp.js
File metadata and controls
47 lines (36 loc) · 880 Bytes
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
importReact,{Component}from'react'
import{Root}from'native-base'
importAppNavigatorfrom'./AppNavigator'
exportdefaultclassAppextendsComponent<{}>{
navStack =[]
constructor(props){
super(props)
this.pushNavStack =this.pushNavStack.bind(this)
this.popNavStack=this.popNavStack.bind(this)
this.isExitable=this.isExitable.bind(this)
}
componentDidMount(){
// SplashScreen.hide();
}
pushNavStack(screen){
this.navStack.push(screen)
}
popNavStack(){
this.navStack.pop()
}
isExitable(){
if(this.navStack.length==1){
returntrue
}else{
returnfalse
}
}
render(){
return(
<Root>
<AppNavigator
screenProps={{pushNavStack: this.pushNavStack,popNavStack: this.popNavStack,isExitable: this.isExitable}}/>
</Root>
)
}
}