-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRouter.js
More file actions
34 lines (31 loc) · 1.03 KB
/
Router.js
File metadata and controls
34 lines (31 loc) · 1.03 KB
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
import React from 'react';
import { Scene, Router, Stack, Actions } from 'react-native-router-flux';
import Welcome from './components/Welcome';
import Camera from './components/Camera';
import Library from './components/Library';
import Wildflower from './components/Wildflower';
//import reactrouter flux library
//import additional components
const RouterComponent = () => {
return (
<Router>
<Stack key="root">
<Scene key="login" component={Welcome} title="Login" initial />
<Scene
onRight={() => Actions.library()}
rightTitle="Library"
key="camera"
component={Camera}
title="Camera" />
<Scene key="library" component={Library} title="Library" />
<Scene key="wildflower" component={Wildflower} title="Wildflower" />
</Stack>
</Router>
)
}
const styles = {
container: {
flex: 1,
},
};
export default RouterComponent;