Browse Source

auto commit

app
jfinn 3 years ago
parent
commit
eef2609166
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      mdev/rn_vshot.native.js

+ 6
- 3
mdev/rn_vshot.native.js View File

7
 
7
 
8
 class ExampleCaptureOnMountManually extends Component {
8
 class ExampleCaptureOnMountManually extends Component {
9
   componentDidMount () {
9
   componentDidMount () {
10
-    this.refs.viewShot.capture().then(uri => {
10
+  	// captureScreen
11
+    // this.refs.viewShot.capture().then(uri => {
12
+    this.refs.captureScreen.capture().then(uri => {
11
       console.log("do something with ", uri);
13
       console.log("do something with ", uri);
12
     });
14
     });
13
   }
15
   }
14
   render() {
16
   render() {
17
+      // <ViewShot ref="viewShot" options={{ format: "jpg", quality: 0.9 }}>
15
     return (
18
     return (
16
-      <captureScreen ref="viewShot" options={{ format: "jpg", quality: 0.9 }}>
19
+      <ViewShot ref="captureScreen" options={{ format: "jpg", quality: 0.9 }}>
17
         <Text>...Something to rasterize...</Text>
20
         <Text>...Something to rasterize...</Text>
18
-      </captureScreen>
21
+      </ViewShot>
19
     );
22
     );
20
   }
23
   }
21
 }
24
 }

Loading…
Cancel
Save