Skip to content

Commit 23dab63

Browse files
committed
Change react-native/router
1 parent 46dc251 commit 23dab63

File tree

25 files changed

+498
-233
lines changed

25 files changed

+498
-233
lines changed

examples/rn-demo/coreTest/NavBar.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

examples/rn-demo/coreTest/home/HomePage.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

examples/rn-demo/coreTest/routes.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/rn-demo/coreTest/users/LoginPage.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/rn-demo/coreTest/users/RegisterPage.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/rn-demo/coreTest/users/Style.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/rn-demo/index.ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
const { AppRegistry } = require('react-native');
3-
const setup = require('./coreTest/index');
3+
const setup = require('./src/js/index');
44
// import setup from './coreDemo/test'
55
AppRegistry.registerComponent('app', setup);

examples/rn-demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"mobx": "^3.1.9",
1313
"mobx-react": "^4.1.8",
1414
"react-native-router-flux": "^4.0.0-beta.12",
15-
"restackx-core":"0.1.0"
15+
"restackx-core":"0.1.0",
16+
"react-router-native": "^4.1.1"
1617
},
1718
"devDependencies": {
1819
"babel-jest": "20.0.1",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import React, {PropTypes} from 'react';
2+
import {observable, computed, reaction} from 'mobx'
3+
import {observer} from "mobx-react";
4+
import {
5+
StyleSheet,
6+
Text,
7+
View,
8+
} from 'react-native';
9+
import BaseController from '../../component/BaseController'
10+
11+
@observer
12+
export default class Application extends BaseController {
13+
componentWillMount() {
14+
15+
}
16+
render() {
17+
return (
18+
<View style={styles.container}>
19+
<Text style={styles.instructions}>Welcome to application</Text>
20+
</View>
21+
);
22+
}
23+
}
24+
25+
const styles = StyleSheet.create({
26+
container: {
27+
flex: 1,
28+
// justifyContent: 'center',
29+
alignItems: 'center',
30+
backgroundColor: '#ffa1d7',
31+
},
32+
instructions: {
33+
color: '#ffffff',
34+
fontSize: 20,
35+
textAlign: 'center',
36+
marginTop: 150,
37+
38+
},
39+
});
40+
41+
Application.prototypes = {
42+
uid: PropTypes.string
43+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
* @flow
5+
*/
6+
7+
import React, {PropTypes} from 'react';
8+
import {observable, computed, reaction} from 'mobx'
9+
import {observer} from "mobx-react";
10+
11+
import {
12+
StyleSheet,
13+
Text,
14+
View,
15+
} from 'react-native';
16+
import BaseController from '../../component/BaseController'
17+
18+
19+
@observer
20+
export default class HomePage extends BaseController {
21+
@observable id;
22+
23+
componentWillMount() {
24+
25+
}
26+
componentDidMount() {
27+
super.componentDidMount();
28+
29+
}
30+
render() {
31+
return (
32+
<View style={styles.container}>
33+
<Text style={styles.instructions}>restakx-core</Text>
34+
<Text style={styles.instructions}>welcome to Home</Text>
35+
</View>
36+
);
37+
}
38+
}
39+
40+
const styles = StyleSheet.create({
41+
container: {
42+
flex: 1,
43+
justifyContent: 'center',
44+
alignItems: 'center',
45+
backgroundColor: '#ffb283',
46+
},
47+
instructions: {
48+
color: '#376aff',
49+
fontSize: 20,
50+
textAlign: 'center',
51+
52+
},
53+
});
54+
55+
HomePage.prototypes = {
56+
user: PropTypes.object
57+
}
58+
59+
60+
// export default HomePage;
61+

0 commit comments

Comments
 (0)