diff --git a/zh-cn/react-native-view-shot.md b/zh-cn/react-native-view-shot.md
index edc733dd742786df0ae1af5c69485531f390a687..1bba89c6923d46076007a1a2187f3f909eb2c45a 100644
--- a/zh-cn/react-native-view-shot.md
+++ b/zh-cn/react-native-view-shot.md
@@ -1,5 +1,5 @@
-> 模板版本:v0.1.3
+> 模板版本:v0.2.2
react-native-view-shot
@@ -13,7 +13,7 @@
-> [!tip] [Github 地址](https://github.com/react-native-oh-library/react-native-view-shot)
+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-view-shot)
## 安装与使用
@@ -48,18 +48,17 @@ import React from "react";
import { View, Text, Button } from "react-native";
import ViewShot, { captureRef, captureScreen } from "react-native-view-shot";
-export default function App() {
- const view = React.useRef < View > null;
+export function ViewShotDemo() {
+ const view = React.useRef < View > (null);
const ref = React.useRef(null);
- const onCapture = (uri) => {
+ const onCapture = (res) => {
console.info("onCapture callback");
- setTxt(JSON.stringify(uri));
+ setTxt(JSON.stringify(res));
};
const onCaptureFailure = (err) => {
console.info("onCaptureFailure " + JSON.stringify(err));
setTxt(JSON.stringify(err));
};
- const [txt, setTxt] = React.useState < string > "";
return (
@@ -86,29 +85,28 @@ export default function App() {
Hello World
- message:{txt}