Browse Source

update example with latest RN

Gaëtan Renaudeau 7 years ago
parent
commit
cbffb12449
3 changed files with 288 additions and 445 deletions
  1. 7
    15
      example/Btn.js
  2. 4
    3
      example/package.json
  3. 277
    427
      example/yarn.lock

+ 7
- 15
example/Btn.js View File

1
 //@flow
1
 //@flow
2
-import React, {
3
-  Component,
4
-  PropTypes,
5
-} from "react";
6
-import {
7
-  Text,
8
-  TouchableOpacity,
9
-  StyleSheet,
10
-} from "react-native";
2
+import React, { Component } from "react";
3
+import PropTypes from "prop-types";
4
+import { Text, TouchableOpacity, StyleSheet } from "react-native";
11
 
5
 
12
 const styles = StyleSheet.create({
6
 const styles = StyleSheet.create({
13
   root: {
7
   root: {
17
     color: "#36f",
11
     color: "#36f",
18
     borderWidth: 1,
12
     borderWidth: 1,
19
     borderColor: "#36f",
13
     borderColor: "#36f",
20
-    fontSize: 12,
14
+    fontSize: 12
21
   }
15
   }
22
 });
16
 });
23
 
17
 
24
 export default class Btn extends Component {
18
 export default class Btn extends Component {
25
   static propTypes = {
19
   static propTypes = {
26
     onPress: PropTypes.func.isRequired,
20
     onPress: PropTypes.func.isRequired,
27
-    label: PropTypes.string.isRequired,
21
+    label: PropTypes.string.isRequired
28
   };
22
   };
29
-  render () {
23
+  render() {
30
     const { onPress, label } = this.props;
24
     const { onPress, label } = this.props;
31
     return (
25
     return (
32
       <TouchableOpacity onPress={onPress}>
26
       <TouchableOpacity onPress={onPress}>
33
-        <Text style={styles.root}>
34
-          {label}
35
-        </Text>
27
+        <Text style={styles.root}>{label}</Text>
36
       </TouchableOpacity>
28
       </TouchableOpacity>
37
     );
29
     );
38
   }
30
   }

+ 4
- 3
example/package.json View File

8
     "ios": "react-native run-ios"
8
     "ios": "react-native run-ios"
9
   },
9
   },
10
   "dependencies": {
10
   "dependencies": {
11
-    "gl-react": "^2.2.10",
11
+    "gl-react": "^2.3.1",
12
     "gl-react-native": "^2.47.0",
12
     "gl-react-native": "^2.47.0",
13
     "lodash": "4.17.4",
13
     "lodash": "4.17.4",
14
-    "react": "16.0.0-alpha.12",
15
-    "react-native": "^0.47.0",
14
+    "prop-types": "^15.6.0",
15
+    "react": "^16.0.0",
16
+    "react-native": "^0.49.0",
16
     "react-native-maps": "^0.16.2",
17
     "react-native-maps": "^0.16.2",
17
     "react-native-svg": "^5.4.1",
18
     "react-native-svg": "^5.4.1",
18
     "react-native-svg-uri": "github:gre/react-native-svg-uri#onLoad",
19
     "react-native-svg-uri": "github:gre/react-native-svg-uri#onLoad",

+ 277
- 427
example/yarn.lock
File diff suppressed because it is too large
View File