Browse Source

example to show the version of view shot

Gaëtan Renaudeau 4 years ago
parent
commit
276b2501c3
No account linked to committer's email address
2 changed files with 4 additions and 1 deletions
  1. 2
    0
      example/package.json
  2. 2
    1
      example/src/App.js

+ 2
- 0
example/package.json View File

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 View File

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;