-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
26 lines (20 loc) · 712 Bytes
/
App.js
File metadata and controls
26 lines (20 loc) · 712 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
import React, { Component } from 'react';
import { Navigator } from 'react-native';
import Splash from './Splash';
import Feed from './Feed';
import Article from './Article';
class App extends Component {
renderScene(route, navigator){
switch (route.name){
case 'splash': return <Splash navigator={navigator} />
case 'feed': return <Feed navigator={navigator} />
case 'article': return <Article navigator={navigator} article={route.article} />
}
}
render(){
return(
<Navigator sceneStyle={{backgroundColor: 'white'}} renderScene={this.renderScene} initialRoute={{name: 'splash'}}/>
)
}
}
module.exports = App;