瀏覽代碼

update example with latest RN

Gaëtan Renaudeau 7 年之前
父節點
當前提交
cbffb12449
共有 3 個檔案被更改,包括 288 行新增445 行删除
  1. 7
    15
      example/Btn.js
  2. 4
    3
      example/package.json
  3. 277
    427
      example/yarn.lock

+ 7
- 15
example/Btn.js 查看文件

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

+ 4
- 3
example/package.json 查看文件

@@ -8,11 +8,12 @@
8 8
     "ios": "react-native run-ios"
9 9
   },
10 10
   "dependencies": {
11
-    "gl-react": "^2.2.10",
11
+    "gl-react": "^2.3.1",
12 12
     "gl-react-native": "^2.47.0",
13 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 17
     "react-native-maps": "^0.16.2",
17 18
     "react-native-svg": "^5.4.1",
18 19
     "react-native-svg-uri": "github:gre/react-native-svg-uri#onLoad",

+ 277
- 427
example/yarn.lock
文件差異過大導致無法顯示
查看文件