-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
47 lines (36 loc) · 880 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React, { Component } from 'react'
import { Root } from 'native-base'
import AppNavigator from './AppNavigator'
export default class App extends Component<{}> {
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) {
return true
} else {
return false
}
}
render () {
return (
<Root>
<AppNavigator
screenProps={{pushNavStack: this.pushNavStack, popNavStack: this.popNavStack, isExitable: this.isExitable}}/>
</Root>
)
}
}