瀏覽代碼

example to show the version of view shot

Gaëtan Renaudeau 4 年之前
父節點
當前提交
276b2501c3
No account linked to committer's email address
共有 2 個檔案被更改,包括 4 行新增1 行删除
  1. 2
    0
      example/package.json
  2. 2
    1
      example/src/App.js

+ 2
- 0
example/package.json 查看文件

3
   "version": "0.0.1",
3
   "version": "0.0.1",
4
   "private": true,
4
   "private": true,
5
   "scripts": {
5
   "scripts": {
6
+    "ios": "react-native run-ios",
7
+    "postinstall": "cd ios && pod install",
6
     "start": "react-native start",
8
     "start": "react-native start",
7
     "lint": "eslint ."
9
     "lint": "eslint ."
8
   },
10
   },

+ 2
- 1
example/src/App.js 查看文件

9
   StyleSheet,
9
   StyleSheet,
10
   ScrollView,
10
   ScrollView,
11
 } from 'react-native';
11
 } from 'react-native';
12
+import libPkg from 'react-native-view-shot/package.json';
12
 import { createAppContainer } from 'react-navigation';
13
 import { createAppContainer } from 'react-navigation';
13
 import { createStackNavigator } from 'react-navigation-stack';
14
 import { createStackNavigator } from 'react-navigation-stack';
14
 
15
 
82
 
83
 
83
 class HomeScreen extends Component {
84
 class HomeScreen extends Component {
84
   static navigationOptions = {
85
   static navigationOptions = {
85
-    title: 'Home',
86
+    title: 'react-native-view-shot ' + libPkg.version,
86
   };
87
   };
87
   render() {
88
   render() {
88
     const { navigation } = this.props;
89
     const { navigation } = this.props;