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

+ 2
- 1
example/src/App.js View File

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